deckhearth/.next/static/chunks/pages/cards.js

125 lines
416 KiB
JavaScript
Raw Normal View History

/*
* 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["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([["pages/cards"],{
/***/ "(pages-dir-browser)/./components/Layout.js":
/*!******************************!*\
!*** ./components/Layout.js ***!
\******************************/
/***/ ((__webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Layout)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(pages-dir-browser)/./node_modules/react/jsx-dev-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"(pages-dir-browser)/./node_modules/react/index.js\");\n/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/router */ \"(pages-dir-browser)/./node_modules/next/router.js\");\n/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! next/link */ \"(pages-dir-browser)/./node_modules/next/link.js\");\n/* harmony import */ var _lib_theme_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib/theme-context */ \"(pages-dir-browser)/./lib/theme-context.js\");\n\nvar _s = $RefreshSig$();\n\n\n\n\nfunction Layout(param) {\n let { children, user = {\n email: 'me@randallstillwell.com',\n role: 'user'\n } } = param;\n _s();\n const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();\n const { theme, toggleTheme } = (0,_lib_theme_context__WEBPACK_IMPORTED_MODULE_4__.useTheme)();\n const [searchQuery, setSearchQuery] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');\n const navigation = [\n {\n name: 'Dashboard',\n href: '/dashboard',\n icon: 'grid',\n active: router.pathname === '/dashboard'\n },\n {\n name: 'My Collection',\n href: '/collections',\n icon: 'collection',\n active: router.pathname === '/collections',\n badge: '247'\n },\n {\n name: 'Cards',\n href: '/cards',\n icon: 'card',\n active: router.pathname === '/cards'\n },\n {\n name: 'Decks',\n href: '/decks',\n icon: 'deck',\n active: router.pathname === '/decks',\n badge: '12'\n },\n {\n name: 'Analytics',\n href: '/analytics',\n icon: 'analytics',\n active: router.pathname === '/analytics'\n },\n {\n name: 'Community',\n href: '/community',\n icon: 'community',\n active: router.pathname === '/community'\n },\n {\n name: 'Settings',\n href: '/settings',\n icon: 'settings',\n active: router.pathname === '/settings'\n },\n {\n name: 'Logout',\n href: '/logout',\n icon: 'logout',\n active: router.pathname === '/logout'\n }\n ];\n const getIcon = (iconName)=>{\n const icons = {\n grid: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"svg\", {\n className: \"h-6 w-6\",\n fill: \"none\",\n stroke: \"currentColor\",\n viewBox: \"0 0 24 24\",\n children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n d: \"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z\"\n }, void 0, false, {\n fileName: \"/Users/rstillw/Documents/tcg-vault/components/Layout.js\",\n lineNumber: 26,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Frstillw%2FDocuments%2Ftcg-vault%2Fpages%2Fcards.js&page=%2Fcards!":
/*!********************************************************************************************************************************************************************************!*\
!*** ./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Frstillw%2FDocuments%2Ftcg-vault%2Fpages%2Fcards.js&page=%2Fcards! ***!
\********************************************************************************************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval(__webpack_require__.ts("\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/cards\",\n function () {\n return __webpack_require__(/*! ./pages/cards.js */ \"(pages-dir-browser)/./pages/cards.js\");\n }\n ]);\n if(true) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/cards\"])\n });\n }\n //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHBhZ2VzLWRpci1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvYnVpbGQvd2VicGFjay9sb2FkZXJzL25leHQtY2xpZW50LXBhZ2VzLWxvYWRlci5qcz9hYnNvbHV0ZVBhZ2VQYXRoPSUyRlVzZXJzJTJGcnN0aWxsdyUyRkRvY3VtZW50cyUyRnRjZy12YXVsdCUyRnBhZ2VzJTJGY2FyZHMuanMmcGFnZT0lMkZjYXJkcyEiLCJtYXBwaW5ncyI6IjtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsbUJBQU8sQ0FBQyw4REFBa0I7QUFDekM7QUFDQTtBQUNBLE9BQU8sSUFBVTtBQUNqQixNQUFNLFVBQVU7QUFDaEI7QUFDQSxPQUFPO0FBQ1A7QUFDQSIsInNvdXJjZXMiOlsiIl0sInNvdXJjZXNDb250ZW50IjpbIlxuICAgICh3aW5kb3cuX19ORVhUX1AgPSB3aW5kb3cuX19ORVhUX1AgfHwgW10pLnB1c2goW1xuICAgICAgXCIvY2FyZHNcIixcbiAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHJlcXVpcmUoXCIuL3BhZ2VzL2NhcmRzLmpzXCIpO1xuICAgICAgfVxuICAgIF0pO1xuICAgIGlmKG1vZHVsZS5ob3QpIHtcbiAgICAgIG1vZHVsZS5ob3QuZGlzcG9zZShmdW5jdGlvbiAoKSB7XG4gICAgICAgIHdpbmRvdy5fX05FWFRfUC5wdXNoKFtcIi9jYXJkc1wiXSlcbiAgICAgIH0pO1xuICAgIH1cbiAgIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(pages-dir-browser)/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Frstillw%2FDocuments%2Ftcg-vault%2Fpages%2Fcards.js&page=%2Fcards!\n"));
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/dist/client/get-domain-locale.js":
/*!************************************************************!*\
!*** ./node_modules/next/dist/client/get-domain-locale.js ***!
\************************************************************/
/***/ ((module, exports, __webpack_require__) => {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"getDomainLocale\", ({\n enumerable: true,\n get: function() {\n return getDomainLocale;\n }\n}));\nconst _normalizetrailingslash = __webpack_require__(/*! ./normalize-trailing-slash */ \"(pages-dir-browser)/./node_modules/next/dist/client/normalize-trailing-slash.js\");\nconst basePath = false || '';\nfunction getDomainLocale(path, locale, locales, domainLocales) {\n if (false) {} else {\n return false;\n }\n}\nif ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=get-domain-locale.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports signature on update so we can compare the boundary\n // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/vercel/next.js/pull/53797)\n module.hot.dispose(function (data) {\n data.prevSignature =\n self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports);\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevSignature !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevSignature, self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports))) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Si
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/dist/client/link.js":
/*!***********************************************!*\
!*** ./node_modules/next/dist/client/link.js ***!
\***********************************************/
/***/ ((module, exports, __webpack_require__) => {
"use strict";
eval(__webpack_require__.ts("/* __next_internal_client_entry_do_not_use__ cjs */ \nvar _s = $RefreshSig$();\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n0 && (0);\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n default: function() {\n return _default;\n },\n useLinkStatus: function() {\n return useLinkStatus;\n }\n});\nconst _interop_require_wildcard = __webpack_require__(/*! @swc/helpers/_/_interop_require_wildcard */ \"(pages-dir-browser)/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js\");\nconst _jsxruntime = __webpack_require__(/*! react/jsx-runtime */ \"(pages-dir-browser)/./node_modules/react/jsx-runtime.js\");\nconst _react = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(/*! react */ \"(pages-dir-browser)/./node_modules/react/index.js\"));\nconst _resolvehref = __webpack_require__(/*! ./resolve-href */ \"(pages-dir-browser)/./node_modules/next/dist/client/resolve-href.js\");\nconst _islocalurl = __webpack_require__(/*! ../shared/lib/router/utils/is-local-url */ \"(pages-dir-browser)/./node_modules/next/dist/shared/lib/router/utils/is-local-url.js\");\nconst _formaturl = __webpack_require__(/*! ../shared/lib/router/utils/format-url */ \"(pages-dir-browser)/./node_modules/next/dist/shared/lib/router/utils/format-url.js\");\nconst _utils = __webpack_require__(/*! ../shared/lib/utils */ \"(pages-dir-browser)/./node_modules/next/dist/shared/lib/utils.js\");\nconst _addlocale = __webpack_require__(/*! ./add-locale */ \"(pages-dir-browser)/./node_modules/next/dist/client/add-locale.js\");\nconst _routercontextsharedruntime = __webpack_require__(/*! ../shared/lib/router-context.shared-runtime */ \"(pages-dir-browser)/./node_modules/next/dist/shared/lib/router-context.shared-runtime.js\");\nconst _useintersection = __webpack_require__(/*! ./use-intersection */ \"(pages-dir-browser)/./node_modules/next/dist/client/use-intersection.js\");\nconst _getdomainlocale = __webpack_require__(/*! ./get-domain-locale */ \"(pages-dir-browser)/./node_modules/next/dist/client/get-domain-locale.js\");\nconst _addbasepath = __webpack_require__(/*! ./add-base-path */ \"(pages-dir-browser)/./node_modules/next/dist/client/add-base-path.js\");\nconst _usemergedref = __webpack_require__(/*! ./use-merged-ref */ \"(pages-dir-browser)/./node_modules/next/dist/client/use-merged-ref.js\");\nconst _erroronce = __webpack_require__(/*! ../shared/lib/utils/error-once */ \"(pages-dir-browser)/./node_modules/next/dist/shared/lib/utils/error-once.js\");\nconst prefetched = new Set();\nfunction prefetch(router, href, as, options) {\n if (false) {}\n if (!(0, _islocalurl.isLocalURL)(href)) {\n return;\n }\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale = typeof options.locale !== 'undefined' ? options.locale : 'locale' in router ? router.locale : undefined;\n const prefetchedKey = href + '%' + as + '%' + locale;\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return;\n }\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey);\n }\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n router.prefetch(href, as, options).catch((err)=>{\n if (true) {\n // rethrow to show invalid URL errors\n throw err;\n }\n });\n}\nfunction isModifiedEvent(event) {\n const eventTarget = event.currentTarget;\n const target = eventTarget.getAttribute('target');\n return target && target !== '_self' || event.metaKey || event.ctrlKey || event.shiftKey
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/dist/client/use-intersection.js":
/*!***********************************************************!*\
!*** ./node_modules/next/dist/client/use-intersection.js ***!
\***********************************************************/
/***/ ((module, exports, __webpack_require__) => {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"useIntersection\", ({\n enumerable: true,\n get: function() {\n return useIntersection;\n }\n}));\nconst _react = __webpack_require__(/*! react */ \"(pages-dir-browser)/./node_modules/react/index.js\");\nconst _requestidlecallback = __webpack_require__(/*! ./request-idle-callback */ \"(pages-dir-browser)/./node_modules/next/dist/client/request-idle-callback.js\");\nconst hasIntersectionObserver = typeof IntersectionObserver === 'function';\nconst observers = new Map();\nconst idList = [];\nfunction createObserver(options) {\n const id = {\n root: options.root || null,\n margin: options.rootMargin || ''\n };\n const existing = idList.find((obj)=>obj.root === id.root && obj.margin === id.margin);\n let instance;\n if (existing) {\n instance = observers.get(existing);\n if (instance) {\n return instance;\n }\n }\n const elements = new Map();\n const observer = new IntersectionObserver((entries)=>{\n entries.forEach((entry)=>{\n const callback = elements.get(entry.target);\n const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;\n if (callback && isVisible) {\n callback(isVisible);\n }\n });\n }, options);\n instance = {\n id,\n observer,\n elements\n };\n idList.push(id);\n observers.set(id, instance);\n return instance;\n}\nfunction observe(element, callback, options) {\n const { id, observer, elements } = createObserver(options);\n elements.set(element, callback);\n observer.observe(element);\n return function unobserve() {\n elements.delete(element);\n observer.unobserve(element);\n // Destroy observer when there's nothing left to watch:\n if (elements.size === 0) {\n observer.disconnect();\n observers.delete(id);\n const index = idList.findIndex((obj)=>obj.root === id.root && obj.margin === id.margin);\n if (index > -1) {\n idList.splice(index, 1);\n }\n }\n };\n}\nfunction useIntersection(param) {\n let { rootRef, rootMargin, disabled } = param;\n const isDisabled = disabled || !hasIntersectionObserver;\n const [visible, setVisible] = (0, _react.useState)(false);\n const elementRef = (0, _react.useRef)(null);\n const setElement = (0, _react.useCallback)((element)=>{\n elementRef.current = element;\n }, []);\n (0, _react.useEffect)(()=>{\n if (hasIntersectionObserver) {\n if (isDisabled || visible) return;\n const element = elementRef.current;\n if (element && element.tagName) {\n const unobserve = observe(element, (isVisible)=>isVisible && setVisible(isVisible), {\n root: rootRef == null ? void 0 : rootRef.current,\n rootMargin\n });\n return unobserve;\n }\n } else {\n if (!visible) {\n const idleCallback = (0, _requestidlecallback.requestIdleCallback)(()=>setVisible(true));\n return ()=>(0, _requestidlecallback.cancelIdleCallback)(idleCallback);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isDisabled,\n rootMargin,\n rootRef,\n visible,\n elementRef.current\n ]);\n const resetVisible = (0, _react.useCallback)(()=>{\n setVisible(false);\n }, []);\n return [\n setElement,\n visible,\n resetVisible\n ];\n}\nif ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', {\n value: true\n });\n Object.assign(exports.default, exports);\n module.expo
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/dist/client/use-merged-ref.js":
/*!*********************************************************!*\
!*** ./node_modules/next/dist/client/use-merged-ref.js ***!
\*********************************************************/
/***/ ((module, exports, __webpack_require__) => {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"useMergedRef\", ({\n enumerable: true,\n get: function() {\n return useMergedRef;\n }\n}));\nconst _react = __webpack_require__(/*! react */ \"(pages-dir-browser)/./node_modules/react/index.js\");\nfunction useMergedRef(refA, refB) {\n const cleanupA = (0, _react.useRef)(null);\n const cleanupB = (0, _react.useRef)(null);\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (e.g. via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return (0, _react.useCallback)((current)=>{\n if (current === null) {\n const cleanupFnA = cleanupA.current;\n if (cleanupFnA) {\n cleanupA.current = null;\n cleanupFnA();\n }\n const cleanupFnB = cleanupB.current;\n if (cleanupFnB) {\n cleanupB.current = null;\n cleanupFnB();\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current);\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current);\n }\n }\n }, [\n refA,\n refB\n ]);\n}\nfunction applyRef(refA, current) {\n if (typeof refA === 'function') {\n const cleanup = refA(current);\n if (typeof cleanup === 'function') {\n return cleanup;\n } else {\n return ()=>refA(null);\n }\n } else {\n refA.current = current;\n return ()=>{\n refA.current = null;\n };\n }\n}\nif ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=use-merged-ref.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports signature on update so we can compare the boundary\n // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/vercel/next.js/pull/53797)\n module.hot.dispose(fu
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/dist/shared/lib/utils/error-once.js":
/*!***************************************************************!*\
!*** ./node_modules/next/dist/shared/lib/utils/error-once.js ***!
\***************************************************************/
/***/ ((module, exports, __webpack_require__) => {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"errorOnce\", ({\n enumerable: true,\n get: function() {\n return errorOnce;\n }\n}));\nlet errorOnce = (_)=>{};\nif (true) {\n const errors = new Set();\n errorOnce = (msg)=>{\n if (!errors.has(msg)) {\n console.error(msg);\n }\n errors.add(msg);\n };\n} //# sourceMappingURL=error-once.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports signature on update so we can compare the boundary\n // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/vercel/next.js/pull/53797)\n module.hot.dispose(function (data) {\n data.prevSignature =\n self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports);\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevSignature !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevSignature, self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports))) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevSignature !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/link.js":
/*!***********************************!*\
!*** ./node_modules/next/link.js ***!
\***********************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval(__webpack_require__.ts("module.exports = __webpack_require__(/*! ./dist/client/link */ \"(pages-dir-browser)/./node_modules/next/dist/client/link.js\")\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHBhZ2VzLWRpci1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9uZXh0L2xpbmsuanMiLCJtYXBwaW5ncyI6IkFBQUEsNkhBQThDIiwic291cmNlcyI6WyIvVXNlcnMvcnN0aWxsdy9Eb2N1bWVudHMvdGNnLXZhdWx0L25vZGVfbW9kdWxlcy9uZXh0L2xpbmsuanMiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Rpc3QvY2xpZW50L2xpbmsnKVxuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6WzBdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(pages-dir-browser)/./node_modules/next/link.js\n"));
/***/ }),
/***/ "(pages-dir-browser)/./node_modules/next/router.js":
/*!*************************************!*\
!*** ./node_modules/next/router.js ***!
\*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
eval(__webpack_require__.ts("module.exports = __webpack_require__(/*! ./dist/client/router */ \"(pages-dir-browser)/./node_modules/next/dist/client/router.js\")\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHBhZ2VzLWRpci1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9uZXh0L3JvdXRlci5qcyIsIm1hcHBpbmdzIjoiQUFBQSxpSUFBZ0QiLCJzb3VyY2VzIjpbIi9Vc2Vycy9yc3RpbGx3L0RvY3VtZW50cy90Y2ctdmF1bHQvbm9kZV9tb2R1bGVzL25leHQvcm91dGVyLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9kaXN0L2NsaWVudC9yb3V0ZXInKVxuIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6WzBdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(pages-dir-browser)/./node_modules/next/router.js\n"));
/***/ }),
/***/ "(pages-dir-browser)/./pages/cards.js":
/*!************************!*\
!*** ./pages/cards.js ***!
\************************/
/***/ ((__webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Cards)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(pages-dir-browser)/./node_modules/react/jsx-dev-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"(pages-dir-browser)/./node_modules/react/index.js\");\n/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/router */ \"(pages-dir-browser)/./node_modules/next/router.js\");\n/* harmony import */ var _components_Layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/Layout */ \"(pages-dir-browser)/./components/Layout.js\");\n\nvar _s = $RefreshSig$(), _s1 = $RefreshSig$();\n\n\n\nfunction Cards() {\n var _tcgOptions_find, _rarityOptions_find, _setOptions_find, _valueRangeOptions_find;\n _s();\n const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();\n const user = {\n email: 'me@randallstillwell.com',\n role: 'user'\n };\n const [cards, setCards] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);\n const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n const [loadingMore, setLoadingMore] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n const [searchQuery, setSearchQuery] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');\n const [selectedTCG, setSelectedTCG] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('all');\n const [selectedRarity, setSelectedRarity] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('all');\n const [selectedSet, setSelectedSet] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('all');\n const [selectedValueRange, setSelectedValueRange] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('all');\n const [viewMode, setViewMode] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('grid'); // grid or list\n const [pagination, setPagination] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({\n page: 1,\n limit: 50,\n total: 0,\n pages: 0\n });\n const [filters, setFilters] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({\n games: [],\n rarities: [],\n sets: []\n });\n const [hasMore, setHasMore] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n const loadingMoreRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const hasMoreRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(true);\n // Fetch cards from database\n const fetchCards = async function() {\n let isLoadMore = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;\n try {\n if (isLoadMore) {\n setLoadingMore(true);\n loadingMoreRef.current = true;\n } else {\n setLoading(true);\n }\n const params = new URLSearchParams({\n query: searchQuery,\n game: selectedTCG,\n rarity: selectedRarity,\n set: selectedSet,\n minPrice: selectedValueRange === 'under-50' ? '0' : selectedValueRange === '50-100' ? '50' : selectedValueRange === '100-500' ? '100' : selectedValueRange === '500-1000' ? '500' : selectedValueRange === 'over-1000' ? '1000' : '',\n maxPrice: selectedValueRange === '50-100' ? '100' : selectedValueRange === '100-500' ? '500' : selectedValueRange === '500-1000' ? '1000' : '',\n page: pagination.page.toString(),\n limit: pagination.limit.toString()\n });\n const response = await fetch(\"/api/cards/search?\".concat(params));\n const data = await response.json();\n if (data.success) {\n if (isLoadMore) {\n setCards((prevCards)=>[\n
/***/ })
},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ __webpack_require__.O(0, ["pages/_app","main"], () => (__webpack_exec__("(pages-dir-browser)/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Frstillw%2FDocuments%2Ftcg-vault%2Fpages%2Fcards.js&page=%2Fcards!")));
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
/******/ }
]);