"use strict";
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
self["webpackHotUpdate_N_E"]("pages/index",{
/***/ "./pages/index.tsx":
/*!*************************!*\
!*** ./pages/index.tsx ***!
\*************************/
/***/ (function(module, __webpack_exports__, __webpack_require__) {
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ Home; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"./node_modules/react/jsx-dev-runtime.js\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! next/link */ \"./node_modules/next/link.js\");\n/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _contexts_HintContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../contexts/HintContext */ \"./contexts/HintContext.tsx\");\n\nvar _s = $RefreshSig$();\n\n\n\nfunction Home() {\n _s();\n const [search, setSearch] = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(\"\");\n const [searchResults, setSearchResults] = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(\"\");\n const { hintsVisible } = (0,_contexts_HintContext__WEBPACK_IMPORTED_MODULE_3__.useHints)();\n const products = [\n {\n id: 1,\n name: \"Professional Hammer\",\n price: 89,\n image: \"/assets/hammer.png\",\n description: \"Heavy-duty forging hammer perfect for metalworking and blacksmithing projects.\"\n },\n {\n id: 2,\n name: \"Steel Anvil\",\n price: 299,\n image: \"/assets/anvil.png\",\n description: \"Solid steel anvil for precise metalworking. Essential tool for any blacksmith.\"\n },\n {\n id: 3,\n name: \"Heat-Resistant Gloves\",\n price: 45,\n image: \"/assets/gloves.png\",\n description: \"Premium heat-resistant gloves for safe handling of hot materials and tools.\"\n },\n {\n id: 4,\n name: \"Forging Tongs\",\n price: 65,\n image: \"/assets/tongs.png\",\n description: \"Precision forging tongs for gripping and manipulating hot metal pieces.\"\n }\n ];\n const handleSearch = ()=>{\n // XSS Vulnerability - Direct HTML injection without ANY sanitization\n const matchingProducts = products.filter((p)=>p.name.toLowerCase().includes(search.toLowerCase())).length;\n // Real XSS vulnerability - directly inserting user input into HTML\n // This will actually execute JavaScript when using event handlers\n setSearchResults(\"
\\n
Search results for: \".concat(search, \"
\\n
Found \").concat(matchingProducts, ' products matching your query
\\n
\\n Raw Query: ').concat(search, \"\\n
\\n
\"));\n };\n return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"min-h-screen\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"section\", {\n className: \"bg-gradient-to-r from-hacksmith-dark via-hacksmith-gray to-hacksmith-dark py-16\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"max-w-6xl mx-auto px-6 text-center\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h1\", {\n className: \"text-5xl font-bold text-hacksmith-orange mb-4\",\n children: \"Hacksmith Tools\"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 61,\n columnNumber: 11\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n className: \"text-xl text-gray-300 mb-8\",\n children: \"Professional blacksmithing and metalworking tools for craftsmen\"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 64,\n columnNumber: 11\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"max-w-md mx-auto mb-8\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"flex gap-2\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n type: \"text\",\n value: search,\n onChange: (e)=>setSearch(e.target.value),\n placeholder: hintsVisible ? \"Search tools... (Try: )\" : \"Search tools...\",\n className: \"input-field flex-1 \".concat(hintsVisible ? \"border-red-500/30 focus:border-red-500\" : \"\")\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 71,\n columnNumber: 15\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n onClick: handleSearch,\n className: \"btn-primary whitespace-nowrap\",\n children: \"Search\"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 78,\n columnNumber: 15\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 70,\n columnNumber: 13\n }, this),\n searchResults && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"mt-4 p-4 bg-hacksmith-gray rounded-lg text-left \".concat(hintsVisible ? \"border border-red-500/30\" : \"\"),\n dangerouslySetInnerHTML: {\n __html: searchResults\n },\n style: {\n wordBreak: \"break-word\"\n }\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 85,\n columnNumber: 15\n }, this),\n hintsVisible && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"mt-2 text-xs text-red-400 opacity-75\",\n children: \"⚠ Input not sanitized - Try: \"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 94,\n columnNumber: 15\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 69,\n columnNumber: 11\n }, this)\n ]\n }, void 0, true, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 60,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 59,\n columnNumber: 7\n }, this),\n hintsVisible && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"section\", {\n className: \"py-8 px-6\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"max-w-4xl mx-auto\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n className: \"card bg-red-900/20 border-red-500\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h3\", {\n className: \"text-lg font-semibold text-red-400 mb-3\",\n children: \"⚠ XSS Testing\"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 107,\n columnNumber: 15\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n className: \"text-sm text-red-300 mb-2\",\n children: \"The search functionality is vulnerable to XSS. Try these payloads:\"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 108,\n columnNumber: 15\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"ul\", {\n className: \"text-sm text-red-300 list-disc pl-4 space-y-1\",\n children: [\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"li\", {\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"code\", {\n children: \"\"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 112,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 112,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"li\", {\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"code\", {\n children: \"
\"\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 113,\n columnNumber: 21\n }, this)\n }, void 0, false, {\n fileName: \"/Users/s41r4j/Documents/Codes/Web/THSVWA/pages/index.tsx\",\n lineNumber: 113,\n columnNumber: 17\n }, this),\n /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"li\", {\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"code\", {\n children: \"