diff --git a/.next/BUILD_ID b/.next/BUILD_ID new file mode 100644 index 0000000..1722cb4 --- /dev/null +++ b/.next/BUILD_ID @@ -0,0 +1 @@ +ta-9EOrBIQCfqkGzcHGYz \ No newline at end of file diff --git a/.next/build-manifest.json b/.next/build-manifest.json new file mode 100644 index 0000000..83532cd --- /dev/null +++ b/.next/build-manifest.json @@ -0,0 +1,35 @@ +{ + "polyfillFiles": [ + "static/chunks/polyfills-42372ed130431b0a.js" + ], + "devFiles": [], + "ampDevFiles": [], + "lowPriorityFiles": [ + "static/ta-9EOrBIQCfqkGzcHGYz/_buildManifest.js", + "static/ta-9EOrBIQCfqkGzcHGYz/_ssgManifest.js" + ], + "rootMainFiles": [], + "rootMainFilesTree": {}, + "pages": { + "/": [ + "static/chunks/webpack-2514287f28c61aa9.js", + "static/chunks/framework-f75312fc4004b783.js", + "static/chunks/main-b0584c0399485cea.js", + "static/chunks/pages/index-a7c47e3ce924016f.js" + ], + "/_app": [ + "static/chunks/webpack-2514287f28c61aa9.js", + "static/chunks/framework-f75312fc4004b783.js", + "static/chunks/main-b0584c0399485cea.js", + "static/css/fd61543791679090.css", + "static/chunks/pages/_app-d59881a6b717b660.js" + ], + "/_error": [ + "static/chunks/webpack-2514287f28c61aa9.js", + "static/chunks/framework-f75312fc4004b783.js", + "static/chunks/main-b0584c0399485cea.js", + "static/chunks/pages/_error-e15c84159987e7e6.js" + ] + }, + "ampFirstPages": [] +} \ No newline at end of file diff --git a/.next/cache/.previewinfo b/.next/cache/.previewinfo new file mode 100644 index 0000000..9147b29 --- /dev/null +++ b/.next/cache/.previewinfo @@ -0,0 +1 @@ +{"previewModeId":"d795978c4257309f42950b4abd879f23","previewModeSigningKey":"05927a0bce54694581c537bcb1e3ef04d9dc93dca3a5721274fafdff3c7f16e4","previewModeEncryptionKey":"e38ae08d93a646354e380eb4ec892454450f2b82dd4a29b998c52d47333cee57","expireAt":1754486679703} \ No newline at end of file diff --git a/.next/cache/.rscinfo b/.next/cache/.rscinfo new file mode 100644 index 0000000..24e36d0 --- /dev/null +++ b/.next/cache/.rscinfo @@ -0,0 +1 @@ +{"encryption.key":"WgEDELVguOVMhJ15dXJTVDVIIZoO5w/NvPgcFODNPJs=","encryption.expire_at":1754486677664} \ No newline at end of file diff --git a/.next/cache/.tsbuildinfo b/.next/cache/.tsbuildinfo new file mode 100644 index 0000000..9f0a6bb --- /dev/null +++ b/.next/cache/.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/react/ts5.0/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/ts5.0/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../../node_modules/@types/aria-query/index.d.ts","../../node_modules/@testing-library/dom/types/matches.d.ts","../../node_modules/@testing-library/dom/types/wait-for.d.ts","../../node_modules/@testing-library/dom/types/query-helpers.d.ts","../../node_modules/@testing-library/dom/types/queries.d.ts","../../node_modules/@testing-library/dom/types/get-queries-for-element.d.ts","../../node_modules/pretty-format/build/types.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/@testing-library/dom/types/screen.d.ts","../../node_modules/@testing-library/dom/types/wait-for-element-to-be-removed.d.ts","../../node_modules/@testing-library/dom/types/get-node-text.d.ts","../../node_modules/@testing-library/dom/types/events.d.ts","../../node_modules/@testing-library/dom/types/pretty-dom.d.ts","../../node_modules/@testing-library/dom/types/role-helpers.d.ts","../../node_modules/@testing-library/dom/types/config.d.ts","../../node_modules/@testing-library/dom/types/suggestions.d.ts","../../node_modules/@testing-library/dom/types/index.d.ts","../../node_modules/@types/react-dom/test-utils/index.d.ts","../../node_modules/@testing-library/react/types/index.d.ts","../../node_modules/next/dist/compiled/webpack/webpack.d.ts","../../node_modules/next/dist/lib/load-custom-routes.d.ts","../../node_modules/next/dist/shared/lib/image-config.d.ts","../../node_modules/next/dist/build/webpack/plugins/subresource-integrity-plugin.d.ts","../../node_modules/next/dist/server/get-page-files.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/ts5.6/index.d.ts","../../node_modules/@types/react/ts5.0/canary.d.ts","../../node_modules/@types/react/ts5.0/experimental.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/canary.d.ts","../../node_modules/@types/react-dom/experimental.d.ts","../../node_modules/next/dist/lib/fallback.d.ts","../../node_modules/next/dist/server/base-http/index.d.ts","../../node_modules/next/dist/server/api-utils/index.d.ts","../../node_modules/next/dist/server/node-environment-baseline.d.ts","../../node_modules/next/dist/server/node-environment-extensions/error-inspect.d.ts","../../node_modules/next/dist/server/node-environment-extensions/random.d.ts","../../node_modules/next/dist/server/node-environment-extensions/date.d.ts","../../node_modules/next/dist/server/node-environment-extensions/web-crypto.d.ts","../../node_modules/next/dist/server/node-environment-extensions/node-crypto.d.ts","../../node_modules/next/dist/server/node-environment.d.ts","../../node_modules/next/dist/server/require-hook.d.ts","../../node_modules/next/dist/server/node-polyfill-crypto.d.ts","../../node_modules/next/dist/lib/page-types.d.ts","../../node_modules/next/dist/build/segment-config/app/app-segment-config.d.ts","../../node_modules/next/dist/build/segment-config/pages/pages-segment-config.d.ts","../../node_modules/next/dist/build/analysis/get-page-static-info.d.ts","../../node_modules/next/dist/build/webpack/loaders/get-module-build-info.d.ts","../../node_modules/next/dist/build/webpack/plugins/middleware-plugin.d.ts","../../node_modules/next/dist/server/lib/cache-control.d.ts","../../node_modules/next/dist/server/lib/cache-handlers/types.d.ts","../../node_modules/next/dist/server/route-kind.d.ts","../../node_modules/next/dist/server/response-cache/types.d.ts","../../node_modules/next/dist/server/resume-data-cache/cache-store.d.ts","../../node_modules/next/dist/server/resume-data-cache/resume-data-cache.d.ts","../../node_modules/next/dist/server/render-result.d.ts","../../node_modules/next/dist/server/body-streams.d.ts","../../node_modules/next/dist/lib/setup-exception-listeners.d.ts","../../node_modules/next/dist/lib/worker.d.ts","../../node_modules/next/dist/lib/constants.d.ts","../../node_modules/next/dist/client/components/app-router-headers.d.ts","../../node_modules/next/dist/build/rendering-mode.d.ts","../../node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.d.ts","../../node_modules/next/dist/server/lib/experimental/ppr.d.ts","../../node_modules/next/dist/build/webpack/plugins/app-build-manifest-plugin.d.ts","../../node_modules/next/dist/build/page-extensions-type.d.ts","../../node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.d.ts","../../node_modules/next/dist/server/instrumentation/types.d.ts","../../node_modules/next/dist/lib/coalesced-function.d.ts","../../node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.d.ts","../../node_modules/next/dist/server/lib/router-utils/types.d.ts","../../node_modules/next/dist/shared/lib/modern-browserslist-target.d.ts","../../node_modules/next/dist/shared/lib/constants.d.ts","../../node_modules/next/dist/trace/types.d.ts","../../node_modules/next/dist/trace/trace.d.ts","../../node_modules/next/dist/trace/shared.d.ts","../../node_modules/next/dist/trace/index.d.ts","../../node_modules/next/dist/build/load-jsconfig.d.ts","../../node_modules/@next/env/dist/index.d.ts","../../node_modules/next/dist/build/webpack/plugins/telemetry-plugin/use-cache-tracker-utils.d.ts","../../node_modules/next/dist/build/webpack/plugins/telemetry-plugin/telemetry-plugin.d.ts","../../node_modules/next/dist/telemetry/storage.d.ts","../../node_modules/next/dist/build/build-context.d.ts","../../node_modules/next/dist/shared/lib/bloom-filter.d.ts","../../node_modules/next/dist/build/webpack-config.d.ts","../../node_modules/next/dist/server/route-definitions/route-definition.d.ts","../../node_modules/next/dist/build/swc/generated-native.d.ts","../../node_modules/next/dist/build/swc/types.d.ts","../../node_modules/next/dist/server/dev/parse-version-info.d.ts","../../node_modules/next/dist/next-devtools/shared/types.d.ts","../../node_modules/next/dist/server/dev/dev-indicator-server-state.d.ts","../../node_modules/next/dist/server/dev/hot-reloader-types.d.ts","../../node_modules/next/dist/server/lib/types.d.ts","../../node_modules/next/dist/server/lib/lru-cache.d.ts","../../node_modules/next/dist/server/lib/dev-bundler-service.d.ts","../../node_modules/next/dist/server/route-matchers/route-matcher.d.ts","../../node_modules/next/dist/server/route-matcher-providers/route-matcher-provider.d.ts","../../node_modules/next/dist/server/route-matcher-managers/route-matcher-manager.d.ts","../../node_modules/next/dist/server/base-http/node.d.ts","../../node_modules/next/dist/build/webpack/plugins/next-font-manifest-plugin.d.ts","../../node_modules/next/dist/server/route-definitions/locale-route-definition.d.ts","../../node_modules/next/dist/server/route-definitions/pages-route-definition.d.ts","../../node_modules/next/dist/shared/lib/router-context.shared-runtime.d.ts","../../node_modules/next/dist/shared/lib/loadable-context.shared-runtime.d.ts","../../node_modules/next/dist/shared/lib/loadable.shared-runtime.d.ts","../../node_modules/next/dist/shared/lib/image-config-context.shared-runtime.d.ts","../../node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.d.ts","../../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.d.ts","../../node_modules/next/dist/server/route-definitions/app-page-route-definition.d.ts","../../node_modules/next/dist/build/webpack/loaders/metadata/types.d.ts","../../node_modules/next/dist/build/webpack/loaders/next-app-loader/index.d.ts","../../node_modules/next/dist/server/lib/app-dir-module.d.ts","../../node_modules/next/dist/compiled/@edge-runtime/cookies/index.d.ts","../../node_modules/next/dist/server/web/spec-extension/cookies.d.ts","../../node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.d.ts","../../node_modules/next/dist/server/async-storage/draft-mode-provider.d.ts","../../node_modules/next/dist/server/web/spec-extension/adapters/headers.d.ts","../../node_modules/next/dist/server/app-render/cache-signal.d.ts","../../node_modules/next/dist/server/app-render/dynamic-rendering.d.ts","../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.d.ts","../../node_modules/next/dist/server/response-cache/index.d.ts","../../node_modules/next/dist/server/request/fallback-params.d.ts","../../node_modules/next/dist/server/lib/lazy-result.d.ts","../../node_modules/next/dist/server/lib/implicit-tags.d.ts","../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.d.ts","../../node_modules/next/dist/shared/lib/deep-readonly.d.ts","../../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.d.ts","../../node_modules/next/dist/server/app-render/app-render.d.ts","../../node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.d.ts","../../node_modules/next/dist/shared/lib/amp-context.shared-runtime.d.ts","../../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.d.ts","../../node_modules/next/dist/server/route-modules/app-page/module.compiled.d.ts","../../node_modules/next/dist/client/components/error-boundary.d.ts","../../node_modules/next/dist/client/components/layout-router.d.ts","../../node_modules/next/dist/client/components/render-from-template-context.d.ts","../../node_modules/next/dist/server/app-render/action-async-storage-instance.d.ts","../../node_modules/next/dist/server/app-render/action-async-storage.external.d.ts","../../node_modules/@types/react/ts5.0/jsx-runtime.d.ts","../../node_modules/next/dist/client/components/client-page.d.ts","../../node_modules/next/dist/client/components/client-segment.d.ts","../../node_modules/next/dist/server/request/search-params.d.ts","../../node_modules/next/dist/client/components/hooks-server-context.d.ts","../../node_modules/next/dist/client/components/http-access-fallback/error-boundary.d.ts","../../node_modules/next/dist/lib/metadata/types/alternative-urls-types.d.ts","../../node_modules/next/dist/lib/metadata/types/extra-types.d.ts","../../node_modules/next/dist/lib/metadata/types/metadata-types.d.ts","../../node_modules/next/dist/lib/metadata/types/manifest-types.d.ts","../../node_modules/next/dist/lib/metadata/types/opengraph-types.d.ts","../../node_modules/next/dist/lib/metadata/types/twitter-types.d.ts","../../node_modules/next/dist/lib/metadata/types/metadata-interface.d.ts","../../node_modules/next/dist/lib/metadata/types/resolvers.d.ts","../../node_modules/next/dist/lib/metadata/types/icons.d.ts","../../node_modules/next/dist/lib/metadata/resolve-metadata.d.ts","../../node_modules/next/dist/lib/metadata/metadata.d.ts","../../node_modules/next/dist/client/components/metadata/metadata-boundary.d.ts","../../node_modules/next/dist/server/app-render/rsc/preloads.d.ts","../../node_modules/next/dist/server/app-render/rsc/postpone.d.ts","../../node_modules/next/dist/server/app-render/rsc/taint.d.ts","../../node_modules/next/dist/server/app-render/collect-segment-data.d.ts","../../node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.d.ts","../../node_modules/next/dist/server/app-render/entry-base.d.ts","../../node_modules/next/dist/build/templates/app-page.d.ts","../../node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts","../../node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.d.ts","../../node_modules/@types/react-dom/server.d.ts","../../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.d.ts","../../node_modules/next/dist/server/route-modules/app-page/module.d.ts","../../node_modules/next/dist/server/after/builtin-request-context.d.ts","../../node_modules/next/dist/server/web/spec-extension/fetch-event.d.ts","../../node_modules/next/dist/server/web/adapter.d.ts","../../node_modules/next/dist/server/use-cache/cache-life.d.ts","../../node_modules/next/dist/server/app-render/types.d.ts","../../node_modules/next/dist/client/components/router-reducer/router-reducer-types.d.ts","../../node_modules/next/dist/client/flight-data-helpers.d.ts","../../node_modules/next/dist/client/components/router-reducer/fetch-server-response.d.ts","../../node_modules/next/dist/shared/lib/app-router-context.shared-runtime.d.ts","../../node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.d.ts","../../node_modules/next/dist/server/route-modules/pages/module.compiled.d.ts","../../node_modules/next/dist/build/templates/pages.d.ts","../../node_modules/next/dist/server/route-modules/pages/module.d.ts","../../node_modules/next/dist/next-devtools/userspace/pages/pages-dev-overlay-setup.d.ts","../../node_modules/next/dist/server/render.d.ts","../../node_modules/next/dist/build/webpack/plugins/pages-manifest-plugin.d.ts","../../node_modules/next/dist/server/route-definitions/pages-api-route-definition.d.ts","../../node_modules/next/dist/server/route-matches/pages-api-route-match.d.ts","../../node_modules/next/dist/server/normalizers/normalizer.d.ts","../../node_modules/next/dist/server/normalizers/locale-route-normalizer.d.ts","../../node_modules/next/dist/server/normalizers/request/pathname-normalizer.d.ts","../../node_modules/next/dist/server/normalizers/request/suffix.d.ts","../../node_modules/next/dist/server/normalizers/request/rsc.d.ts","../../node_modules/next/dist/server/normalizers/request/prefetch-rsc.d.ts","../../node_modules/next/dist/server/normalizers/request/next-data.d.ts","../../node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.d.ts","../../node_modules/next/dist/server/base-server.d.ts","../../node_modules/next/dist/server/lib/render-server.d.ts","../../node_modules/next/dist/server/lib/router-server.d.ts","../../node_modules/next/dist/shared/lib/router/utils/path-match.d.ts","../../node_modules/next/dist/server/lib/router-utils/filesystem.d.ts","../../node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.d.ts","../../node_modules/next/dist/server/lib/router-utils/router-server-context.d.ts","../../node_modules/next/dist/server/route-modules/route-module.d.ts","../../node_modules/next/dist/server/load-components.d.ts","../../node_modules/next/dist/server/route-definitions/app-route-route-definition.d.ts","../../node_modules/next/dist/server/async-storage/work-store.d.ts","../../node_modules/next/dist/server/web/http.d.ts","../../node_modules/next/dist/server/route-modules/app-route/shared-modules.d.ts","../../node_modules/next/dist/client/components/redirect-status-code.d.ts","../../node_modules/next/dist/client/components/redirect-error.d.ts","../../node_modules/next/dist/build/templates/app-route.d.ts","../../node_modules/next/dist/server/route-modules/app-route/module.d.ts","../../node_modules/next/dist/server/route-modules/app-route/module.compiled.d.ts","../../node_modules/next/dist/build/segment-config/app/app-segments.d.ts","../../node_modules/next/dist/build/static-paths/types.d.ts","../../node_modules/next/dist/build/utils.d.ts","../../node_modules/next/dist/build/turborepo-access-trace/types.d.ts","../../node_modules/next/dist/build/turborepo-access-trace/result.d.ts","../../node_modules/next/dist/build/turborepo-access-trace/helpers.d.ts","../../node_modules/next/dist/build/turborepo-access-trace/index.d.ts","../../node_modules/next/dist/export/routes/types.d.ts","../../node_modules/next/dist/export/types.d.ts","../../node_modules/next/dist/export/worker.d.ts","../../node_modules/next/dist/build/worker.d.ts","../../node_modules/next/dist/build/index.d.ts","../../node_modules/next/dist/server/lib/incremental-cache/index.d.ts","../../node_modules/next/dist/server/after/after.d.ts","../../node_modules/next/dist/server/after/after-context.d.ts","../../node_modules/next/dist/server/app-render/work-async-storage-instance.d.ts","../../node_modules/next/dist/server/app-render/work-async-storage.external.d.ts","../../node_modules/next/dist/server/request/params.d.ts","../../node_modules/next/dist/server/route-matches/route-match.d.ts","../../node_modules/next/dist/server/request-meta.d.ts","../../node_modules/next/dist/server/lib/i18n-provider.d.ts","../../node_modules/next/dist/server/web/next-url.d.ts","../../node_modules/next/dist/server/web/spec-extension/request.d.ts","../../node_modules/next/dist/server/web/spec-extension/response.d.ts","../../node_modules/next/dist/build/segment-config/middleware/middleware-config.d.ts","../../node_modules/next/dist/server/web/types.d.ts","../../node_modules/next/dist/shared/lib/router/utils/parse-url.d.ts","../../node_modules/next/dist/server/lib/async-callback-set.d.ts","../../node_modules/next/dist/shared/lib/router/utils/route-regex.d.ts","../../node_modules/next/dist/shared/lib/router/utils/route-matcher.d.ts","../../node_modules/sharp/lib/index.d.ts","../../node_modules/next/dist/server/image-optimizer.d.ts","../../node_modules/next/dist/server/next-server.d.ts","../../node_modules/next/dist/server/dev/static-paths-worker.d.ts","../../node_modules/next/dist/server/dev/next-dev-server.d.ts","../../node_modules/next/dist/server/next.d.ts","../../node_modules/next/dist/types.d.ts","../../node_modules/next/dist/shared/lib/html-context.shared-runtime.d.ts","../../node_modules/next/dist/shared/lib/utils.d.ts","../../node_modules/next/dist/cli/next-test.d.ts","../../node_modules/next/dist/server/config-shared.d.ts","../../node_modules/next/dist/server/config.d.ts","../../node_modules/next/dist/shared/lib/mitt.d.ts","../../node_modules/next/dist/client/route-loader.d.ts","../../node_modules/next/dist/client/page-loader.d.ts","../../node_modules/next/dist/shared/lib/router/router.d.ts","../../node_modules/next/dist/client/with-router.d.ts","../../node_modules/next/dist/client/router.d.ts","../../node_modules/next/router.d.ts","../../node_modules/@vercel/analytics/dist/react/index.d.ts","../../node_modules/@vercel/speed-insights/dist/react/index.d.ts","../../src/contexts/authcontext.tsx","../../src/contexts/themecontext.tsx","../../node_modules/@remix-run/router/dist/history.d.ts","../../node_modules/@remix-run/router/dist/utils.d.ts","../../node_modules/@remix-run/router/dist/router.d.ts","../../node_modules/@remix-run/router/dist/index.d.ts","../../node_modules/react-router/dist/lib/context.d.ts","../../node_modules/react-router/dist/lib/components.d.ts","../../node_modules/react-router/dist/lib/hooks.d.ts","../../node_modules/react-router/dist/lib/deprecations.d.ts","../../node_modules/react-router/dist/index.d.ts","../../node_modules/react-router-dom/dist/dom.d.ts","../../node_modules/react-router-dom/dist/index.d.ts","../../src/components/responsivelayout.tsx","../../src/pages/dashboard.tsx","../../node_modules/@tanstack/query-core/build/legacy/removable.d.ts","../../node_modules/@tanstack/query-core/build/legacy/subscribable.d.ts","../../node_modules/@tanstack/query-core/build/legacy/hydration-cvr-9vdo.d.ts","../../node_modules/@tanstack/query-core/build/legacy/queriesobserver.d.ts","../../node_modules/@tanstack/query-core/build/legacy/infinitequeryobserver.d.ts","../../node_modules/@tanstack/query-core/build/legacy/notifymanager.d.ts","../../node_modules/@tanstack/query-core/build/legacy/focusmanager.d.ts","../../node_modules/@tanstack/query-core/build/legacy/onlinemanager.d.ts","../../node_modules/@tanstack/query-core/build/legacy/streamedquery.d.ts","../../node_modules/@tanstack/query-core/build/legacy/index.d.ts","../../node_modules/@tanstack/react-query/build/legacy/types.d.ts","../../node_modules/@tanstack/react-query/build/legacy/usequeries.d.ts","../../node_modules/@tanstack/react-query/build/legacy/queryoptions.d.ts","../../node_modules/@tanstack/react-query/build/legacy/usequery.d.ts","../../node_modules/@tanstack/react-query/build/legacy/usesuspensequery.d.ts","../../node_modules/@tanstack/react-query/build/legacy/usesuspenseinfinitequery.d.ts","../../node_modules/@tanstack/react-query/build/legacy/usesuspensequeries.d.ts","../../node_modules/@tanstack/react-query/build/legacy/useprefetchquery.d.ts","../../node_modules/@tanstack/react-query/build/legacy/useprefetchinfinitequery.d.ts","../../node_modules/@tanstack/react-query/build/legacy/infinitequeryoptions.d.ts","../../node_modules/@tanstack/react-query/build/legacy/queryclientprovider.d.ts","../../node_modules/@tanstack/react-query/build/legacy/queryerrorresetboundary.d.ts","../../node_modules/@tanstack/react-query/build/legacy/hydrationboundary.d.ts","../../node_modules/@tanstack/react-query/build/legacy/useisfetching.d.ts","../../node_modules/@tanstack/react-query/build/legacy/usemutationstate.d.ts","../../node_modules/@tanstack/react-query/build/legacy/usemutation.d.ts","../../node_modules/@tanstack/react-query/build/legacy/mutationoptions.d.ts","../../node_modules/@tanstack/react-query/build/legacy/useinfinitequery.d.ts","../../node_modules/@tanstack/react-query/build/legacy/isrestoringprovider.d.ts","../../node_modules/@tanstack/react-query/build/legacy/index.d.ts","../../node_modules/axios/index.d.ts","../../src/types/index.ts","../../src/services/tcgapi.ts","../../src/components/collections/collectionmanager.tsx","../../src/pages/collections.tsx","../../src/components/decks/deckmanager.tsx","../../src/pages/decks.tsx","../../src/components/cards/cardmanager.tsx","../../src/components/cards/cardsearch.tsx","../../src/services/carddatasources.ts","../../src/components/cards/carddatabasebrowser.tsx","../../src/hooks/use3dtilt.ts","../../src/components/cardimagedisplay.tsx","../../src/components/glowingcard.tsx","../../src/pages/cards.tsx","../../src/components/scanner/scanmodeselector.tsx","../../src/components/scanner/scanningtoast.tsx","../../src/services/aiocr.ts","../../src/components/scanner/autoscanningcamera.tsx","../../src/components/scanner/cardqueue.tsx","../../src/components/scanner/bulkoperations.tsx","../../src/services/autotagger.ts","../../src/components/scanner/scannerwizard.tsx","../../src/pages/scanner.tsx","../../src/pages/settings.tsx","../../src/components/auth/loginform.tsx","../../src/components/auth/registerform.tsx","../../src/components/admin/usermanagement.tsx","../../src/components/admin/cardmanagement.tsx","../../src/components/admin/systemstats.tsx","../../src/components/admin/cardloader.tsx","../../src/components/admin/adminpanel.tsx","../../src/app.tsx","../../src/app.test.tsx","../../node_modules/web-vitals/dist/modules/types.d.ts","../../node_modules/web-vitals/dist/modules/getcls.d.ts","../../node_modules/web-vitals/dist/modules/getfcp.d.ts","../../node_modules/web-vitals/dist/modules/getfid.d.ts","../../node_modules/web-vitals/dist/modules/getlcp.d.ts","../../node_modules/web-vitals/dist/modules/getttfb.d.ts","../../node_modules/web-vitals/dist/modules/index.d.ts","../../src/reportwebvitals.ts","../../src/index.tsx","../../src/react-app-env.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/jest-diff/build/cleanupsemantic.d.ts","../../node_modules/jest-diff/build/types.d.ts","../../node_modules/jest-diff/build/difflines.d.ts","../../node_modules/jest-diff/build/printdiffs.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@testing-library/jest-dom/types/matchers.d.ts","../../node_modules/@testing-library/jest-dom/types/jest.d.ts","../../node_modules/@testing-library/jest-dom/types/index.d.ts","../../src/setuptests.ts","../../src/components/camerascanner.tsx","../../src/components/mobilenavbar.tsx","../../src/components/navbar.tsx","../../src/components/ocrsettings.tsx","../../src/components/tags/tagmanager.tsx","../../src/config/api.ts","../../src/hooks/usemouseglow.ts","../../src/services/api.ts","../../src/pages/login.tsx","../../src/services/cardmatcher.ts","../../node_modules/@types/bcryptjs/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/lib/type-overrides.d.ts","../../node_modules/@types/pg/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true},"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc",{"version":"0b4db13289fea0e1f35978cc75be1c4fcfa3481f0c07bc065c93ee98fe5797fa","affectsGlobalScope":true},"05321b823dd3781d0b6aac8700bfdc0c9181d56479fe52ba6a40c9196fd661a8","ae77d81a5541a8abb938a0efedf9ac4bea36fb3a24cc28cfa11c598863aba571","3cfb7c0c642b19fb75132154040bb7cd840f0002f9955b14154e69611b9b3f81","8387ec1601cf6b8948672537cf8d430431ba0d87b1f9537b4597c1ab8d3ade5b","d16f1c460b1ca9158e030fdf3641e1de11135e0c7169d3e8cf17cc4cc35d5e64","a934063af84f8117b8ce51851c1af2b76efe960aa4c7b48d0343a1b15c01aedf","e3c5ad476eb2fca8505aee5bdfdf9bf11760df5d0f9545db23f12a5c4d72a718","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","d0570ce419fb38287e7b39c910b468becb5b2278cf33b1000a3d3e82a46ecae2","3aca7f4260dad9dcc0a0333654cb3cde6664d34a553ec06c953bce11151764d7","a0a6f0095f25f08a7129bc4d7cb8438039ec422dc341218d274e1e5131115988","b58f396fe4cfe5a0e4d594996bc8c1bfe25496fbc66cf169d41ac3c139418c77","45785e608b3d380c79e21957a6d1467e1206ac0281644e43e8ed6498808ace72","bece27602416508ba946868ad34d09997911016dbd6893fb884633017f74e2c5","2a90177ebaef25de89351de964c2c601ab54d6e3a157cba60d9cd3eaf5a5ee1a","82200e963d3c767976a5a9f41ecf8c65eca14a6b33dcbe00214fcbe959698c46","b4966c503c08bbd9e834037a8ab60e5f53c5fd1092e8873c4a1c344806acdab2","b598deb1da203a2b58c76cf8d91cfc2ca172d785dacd8466c0a11e400ff6ab2d","480c20eddc2ee5f57954609b2f7a3368f6e0dda4037aa09ccf0d37e0b20d4e5c","db6d2d9daad8a6d83f281af12ce4355a20b9a3e71b82b9f57cddcca0a8964a96","24f8562308dd8ba6013120557fa7b44950b619610b2c6cb8784c79f11e3c4f90","ba1ae645ccbff0137326f99084f5cf87c9fa988c59906177d59deabeee9e428d","a86f82d646a739041d6702101afa82dcb935c416dd93cbca7fd754fd0282ce1f","631eff75b0e35d1b1b31081d55209abc43e16b49426546ab5a9b40bdd40b1f60",{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true},"2e864ea827318e5f490863a8cd412744d9ddb175acf488dd02a941703dad1e38",{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true},{"version":"894dae169f8193e3f07c3fec14149a60592d1f13720907ffdf7b0c05cfb62c38","affectsGlobalScope":true},{"version":"df01885cc27c14632a8c38bdeb053295e69209107bb6c53988b78db5f450cb3c","affectsGlobalScope":true},"38379fa748cc5d259c96da356a849bd290a159ae218e06ec1daa166850e4bf50","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","f51b4042a3ac86f1f707500a9768f88d0b0c1fc3f3e45a73333283dea720cdc6",{"version":"a29bc8aa8cc100d0c09370c03508f1245853efe017bb98699d4c690868371fc7","affectsGlobalScope":true},"6f95830ca11e2c7e82235b73dc149e68a0632b41e671724d12adc83a6750746d","7aa011cda7cf0b9e87c85d128b2eeac9930bda215b0fee265d8bf2cec039fb5f",{"version":"92ec1aeca4e94bdab04083daa6039f807c0fce8f09bc42e8b24bf49fa5cdbbff","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","8463ab6a156dc96200b3d8b8a52dc8d878f13a6b7404439aa2f911d568132808","5289750c112b5dd0e29dfa9089ddbf5d3ed1b544d99731093881e6967f5af4d1","7693b90b3075deaccafd5efb467bf9f2b747a3075be888652ef73e64396d8628","bd01a987f0fcf2344a405e542ee681e420651eaff1222a5a6e0c02fda52343bc","693e50962e90a3548f41bff2c22676e3964212a836022d82e49eca0b20320a38",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},"300b0c12998391154d7b9115a85554e91632a3d3e1b66038e98f2b9cb3c1061d",{"version":"222e742815b14d54db034788a7bee2d51197a2588c35b1fbefe04add6393021c","affectsGlobalScope":true},"93891e576a698609695e5b8117bb128336e4b7b28772e7d7e38e8075790eb42f","69d90a2f13511eeaae271905c8615a93e20335530d1062a93cb04e754e5f04ad","d723063c56101b34a7be5b28dbde80a3ae3dfd5e08fd49a3b569473337ead1f9","fab49059d6c2026bdb2e53e4e5cde1a39da44e61daff1867c8b3b10b507bfe17","5a551275f85bcc4003e543a1951a5b2f682cfba9b2922f65ae0df40ab71724a5","22d1a3163b9a961dbe78b0aedbd7bcbc071ce1f31efb76eb013b0aee230fef0e",{"version":"c31695696ade4514cfcbb22799997b690d3dca7fb72beab68fb2e73b6ef450dd","affectsGlobalScope":true},"d99ad56d57f2c96daaf4475a8b64344b24dedafdb8f3c32d43552bcc72279a75","a101ef17aece908c1029a1bd3f97132794dcff21b4ca0b997d9a633f962c46aa","511575e18249b64b90d8f884fdb8a383c767d1a7efccd9d66a4e125a4dc5c462",{"version":"6d8001f2c3b86c4f1de1d45ecb3f87f287ed7313d6999f8c8318cec4f50e6323","affectsGlobalScope":true},{"version":"9e413bb587e01ba0cb1a87828cc9116669a4a71a61fe3a89b252f86f0c824bc2","affectsGlobalScope":true},"9c3d1222e6e3d8c35a4293d7a54d4142ebb8f7f70ec4111b8136df07fdc66169","70173c475c6e76ccebc37412b02b2e26f62bf45fc1534c3ebe6d7fa60fb88819","87ced739f77d80886ef2b923a7c52c363c549ad8799ae28eb8cc810892f511ad","863bc4e31de6c75423bb02da16190d582b0a69b8964b61d45920e5b2cb3832dd","849484324695b587f06abee7579641efe061b7338f9694ec410a76f477fe4df3","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","6e191fea1db6e9e4fa828259cf489e820ec9170effff57fb081a2f3295db4722","49e0da63a2398d2ae88467f60a69b07e594b7777e01120cd9ebcefa1932484cf","0435070b07e646b406b1c9b8b1b1878ea6917c32abc47e6435ec26d71212d513","f71188f97c9f7d309798ec02a56dd3bf50a4e4d079b3480f275ac13719953898",{"version":"c4454589a0aa92c10d684c8c9584574bc404d1db556d72196cd31f8f7651af1a","affectsGlobalScope":true},"b17790866e140a630fa8891d7105c728a1bd60f4e35822e4b345af166a4a728c","c50c75f4360f6fc06c4be29dafe28210e15c50cd6b04ad19c4808fa504efb51a","d4a1f5f7ee89b2afffd3c74282f8ee65b24266c92b7d40398c12a27054ed745c","900b5a9802192bc77eba35a5b87ce770df7b867a6d61772c554058c9ed635386",{"version":"d291d3d16fa252f6d460687491ea2c5c23098c9dc0d3e106b2803fdc98f48f29","affectsGlobalScope":true},{"version":"f43fcf89d75f13d0908a77cd3fa32b9fd28c915deded9b2778b08f2e242d07a7","affectsGlobalScope":true},"b9a616dec7430044ae735250f8d6a7183f5a9fba63f813e3d29dcab819fd7058","aebf613f7831125038942eba891005fd25fa5cadcc3e3d13af4768dc7549161f","0faee6b555890a1cb106e2adc5d3ffd89545b1da894d474e9d436596d654998f","247e5c34784d185bc81442e8b1a371a36c4a5307a766a3725454c0a191b5cfad","1c382a6446d63340be549a616ff5142a91653cea45d6d137e25b929130a4f29a","729ad315d8fa8556a1cbf88604ce9bfd73f4cc2459b0b9f6da00f75150c2bf9d","3609e455ffcba8176c8ce0aa57f8258fe10cf03987e27f1fab68f702b4426521","d1bd4e51810d159899aad1660ccb859da54e27e08b8c9862b40cd36c1d9ff00f","17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","1cfa8647d7d71cb03847d616bd79320abfc01ddea082a49569fda71ac5ece66b","bb7a61dd55dc4b9422d13da3a6bb9cc5e89be888ef23bbcf6558aa9726b89a1c","413df52d4ea14472c2fa5bee62f7a40abd1eb49be0b9722ee01ee4e52e63beb2","35e6379c3f7cb27b111ad4c1aa69538fd8e788ab737b8ff7596a1b40e96f4f90","1fffe726740f9787f15b532e1dc870af3cd964dbe29e191e76121aa3dd8693f2","e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","12b8dfed70961bea1861e5d39e433580e71323abb5d33da6605182ec569db584","8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","7e560f533aaf88cf9d3b427dcf6c112dd3f2ee26d610e2587583b6c354c753db","71e0082342008e4dfb43202df85ea0986ef8e003c921a1e49999d0234a3019da","27ab780875bcbb65e09da7496f2ca36288b0c541abaa75c311450a077d54ec15","ffa495b17a5ef1d0399586b590bd281056cee6ce3583e34f39926f8dcc6ecdb5","e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","c86fe861cf1b4c46a0fb7d74dffe596cf679a2e5e8b1456881313170f092e3fa","b6db56e4903e9c32e533b78ac85522de734b3d3a8541bf24d256058d464bf04b","24daa0366f837d22c94a5c0bad5bf1fd0f6b29e1fae92dc47c3072c3fdb2fbd5","570bb5a00836ffad3e4127f6adf581bfc4535737d8ff763a4d6f4cc877e60d98","889c00f3d32091841268f0b994beba4dceaa5df7573be12c2c829d7c5fbc232c","65f43099ded6073336e697512d9b80f2d4fec3182b7b2316abf712e84104db00","ce75b1aebb33d510ff28af960a9221410a3eaf7f18fc5f21f9404075fba77256","d6e73f8010935b7b4c7487b6fb13ea197cc610f0965b759bec03a561ccf8423a","3e7efde639c6a6c3edb9847b3f61e308bf7a69685b92f665048c45132f51c218","174f3864e398f3f33f9a446a4f403d55a892aa55328cf6686135dfaf9e171657","824c76aec8d8c7e65769688cbee102238c0ef421ed6686f41b2a7d8e7e78a931","75b868be3463d5a8cfc0d9396f0a3d973b8c297401d00bfb008a42ab16643f13","05c8cd040dc6b8aa18f310b12eaf0407dc4d122ec035dc5b0c9b97e795abfeec","57d6ac03382e30e9213641ff4f18cf9402bb246b77c13c8e848c0b1ca2b7ef92","e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","496bbf339f3838c41f164238543e9fe5f1f10659cb30b68903851618464b98ba","44e0a682d3a20df46bbf8e7e37f2f10b1604d4ab08b3beda1c365e6d9c3ec74d","97395dc4fd32e20b8888849266065caf0b45d12575242c308e8604a4288ec3e5","9e2739b32f741859263fdba0244c194ca8e96da49b430377930b8f721d77c000","fb1d8e814a3eeb5101ca13515e0548e112bd1ff3fb358ece535b93e94adf5a3a","98b18458acb46072947aabeeeab1e410f047e0cacc972943059ca5500b0a5e95","361e2b13c6765d7f85bb7600b48fde782b90c7c41105b7dab1f6e7871071ba20","b620391fe8060cf9bedc176a4d01366e6574d7a71e0ac0ab344a4e76576fcbb8","380647d8f3b7f852cca6d154a376dbf8ac620a2f12b936594504a8a852e71d2f","208c9af9429dd3c76f5927b971263174aaa4bc7621ddec63f163640cbd3c473c","6459054aabb306821a043e02b89d54da508e3a6966601a41e71c166e4ea1474f","a23185bc5ef590c287c28a91baf280367b50ae4ea40327366ad01f6f4a8edbc5","bb37588926aba35c9283fe8d46ebf4e79ffe976343105f5c6d45f282793352b2","002eae065e6960458bda3cf695e578b0d1e2785523476f8a9170b103c709cd4f","c51641ab4bfa31b7a50a0ca37edff67f56fab3149881024345b13f2b48b7d2de","05c97cddbaf99978f83d96de2d8af86aded9332592f08ce4a284d72d0952c391","72179f9dd22a86deaad4cc3490eb0fe69ee084d503b686985965654013f1391b","2e6114a7dd6feeef85b2c80120fdbfb59a5529c0dcc5bfa8447b6996c97a69f5","7b6ff760c8a240b40dab6e4419b989f06a5b782f4710d2967e67c695ef3e93c4","c8f004e6036aa1c764ad4ec543cf89a5c1893a9535c80ef3f2b653e370de45e6","dd80b1e600d00f5c6a6ba23f455b84a7db121219e68f89f10552c54ba46e4dc9","b064c36f35de7387d71c599bfcf28875849a1dbc733e82bd26cae3d1cd060521","6a148329edecbda07c21098639ef4254ef7869fb25a69f58e5d6a8b7b69d4236","8de9fe97fa9e00ec00666fa77ab6e91b35d25af8ca75dabcb01e14ad3299b150","f63ab283a1c8f5c79fabe7ca4ef85f9633339c4f0e822fce6a767f9d59282af2","dba114fb6a32b355a9cfc26ca2276834d72fe0e94cd2c3494005547025015369","a54c996c8870ef1728a2c1fa9b8eaec0bf4a8001cd2583c02dd5869289465b10","df45ca1176e6ac211eae7ddf51336dc075c5314bc5c253651bae639defd5eec5","85e41df4579ceac0616fc81e1aee5c5222941609e6732698e7a551db4c06a78a","fa9e3ec3d9c2072368b2a12686580aff5d7bc41439efa1ee91b378a57f4864c2","f974e4a06953682a2c15d5bd5114c0284d5abf8bc0fe4da25cb9159427b70072","50256e9c31318487f3752b7ac12ff365c8949953e04568009c8705db802776fb","7d73b24e7bf31dfb8a931ca6c4245f6bb0814dfae17e4b60c9e194a631fe5f7b","8d1fd7b451f69cd173e6e20272e0d64ba4a8a1fe0eb3ef5f82134a5b0cb7c9df","d663134457d8d669ae0df34eabd57028bddc04fc444c4bc04bc5215afc91e1f4","a52674bc98da7979607e0f44d4c015c59c1b1d264c83fc50ec79ff2cfea06723","89b3d1b267c4380fbb8e5cadccbb284843b90066f16a2f6e8a5b3a030bb7dcfb","20865ac316b8893c1a0cc383ccfc1801443fbcc2a7255be166cf90d03fac88c9","c9958eb32126a3843deedda8c22fb97024aa5d6dd588b90af2d7f2bfac540f23","461d0ad8ae5f2ff981778af912ba71b37a8426a33301daa00f21c6ccb27f8156","1a82deef4c1d39f6882f28d275cad4c01f907b9b39be9cbc472fcf2cf051e05b","c5426dbfc1cf90532f66965a7aa8c1136a78d4d0f96d8180ecbfc11d7722f1a5","65a15fc47900787c0bd18b603afb98d33ede930bed1798fc984d5ebb78b26cf9","9d202701f6e0744adb6314d03d2eb8fc994798fc83d91b691b75b07626a69801","fa6c12a7c0f6b84d512f200690bfc74819e99efae69e4c95c4cd30f6884c526e","f1c32f9ce9c497da4dc215c3bc84b722ea02497d35f9134db3bb40a8d918b92b",{"version":"b73c319af2cc3ef8f6421308a250f328836531ea3761823b4cabbd133047aefa","affectsGlobalScope":true},"e433b0337b8106909e7953015e8fa3f2d30797cea27141d1c5b135365bb975a6","15b36126e0089bfef173ab61329e8286ce74af5e809d8a72edcafd0cc049057f","ddff7fc6edbdc5163a09e22bf8df7bef75f75369ebd7ecea95ba55c4386e2441","106c6025f1d99fd468fd8bf6e5bda724e11e5905a4076c5d29790b6c3745e50c","a57b1802794433adec9ff3fed12aa79d671faed86c49b09e02e1ac41b4f1d33a","ad10d4f0517599cdeca7755b930f148804e3e0e5b5a3847adce0f1f71bbccd74","1042064ece5bb47d6aba91648fbe0635c17c600ebdf567588b4ca715602f0a9d","0d891735a21edc75df51f3eb995e18149e119d1ce22fd40db2b260c5960b914e","3b414b99a73171e1c4b7b7714e26b87d6c5cb03d200352da5342ab4088a54c85","4360ad4de54de2d5c642c4375d5eab0e7fe94ebe8adca907e6c186bbef75a54d","4a889f2c763edb4d55cb624257272ac10d04a1cad2ed2948b10ed4a7fda2a428","7bb79aa2fead87d9d56294ef71e056487e848d7b550c9a367523ee5416c44cfa","43542b120b07d198a86a21f6df97e6fe4a6327e960342777eefaa407baee2a62","090fa057d7b2c429119fde252e3b7276a7d75a3ec172a9a23aa922dfac5345e8","27ff4196654e6373c9af16b6165120e2dd2169f9ad6abb5c935af5abd8c7938c","24428762d0c97b44c4784d28eee9556547167c4592d20d542a79243f7ca6a73f","d6406c629bb3efc31aedb2de809bef471e475c86c7e67f3ef9b676b5d7e0d6b2","8c030e515014c10a2b98f9f48408e3ba18023dfd3f56e3312c6c2f3ae1f55a16","dafc31e9e8751f437122eb8582b93d477e002839864410ff782504a12f2a550c","4e31a4e6319cee44ce4cec0f8892c60289cfbdbec11dda19c85559bb8ab53bc2","9c82171d836c47486074e4ca8e059735bf97b205e70b196535b5efd40cbe1bc5","f56bdc6884648806d34bc66d31cdb787c4718d04105ce2cd88535db214631f82","20e06cdda4a8fdd7c1b548259f89f01b04e56a513e834463d7bac5632c7cf906","2e4f37ffe8862b14d8e24ae8763daaa8340c0df0b859d9a9733def0eee7562d9","13283350547389802aa35d9f2188effaeac805499169a06ef5cd77ce2a0bd63f","ce791f6ea807560f08065d1af6014581eeb54a05abd73294777a281b6dfd73c2","6ac6715916fa75a1f7ebdfeacac09513b4d904b667d827b7535e84ff59679aff","49f95e989b4632c6c2a578cc0078ee19a5831832d79cc59abecf5160ea71abad","21b4672313ae95583ade84f97ae6bbeaf242ecae783f5653e2e99ac4e21cbbe1","ce0df82a9ae6f914ba08409d4d883983cc08e6d59eb2df02d8e4d68309e7848b","796273b2edc72e78a04e86d7c58ae94d370ab93a0ddf40b1aa85a37a1c29ecd7","5df15a69187d737d6d8d066e189ae4f97e41f4d53712a46b2710ff9f8563ec9f","016fe1e807dfdb88e8773616dde55bd04c087675662a393f20b1ec213b4a2b74","e17cd049a1448de4944800399daa4a64c5db8657cc9be7ef46be66e2a2cd0e7c","d05fb434f4ba073aed74b6c62eff1723c835de2a963dbb091e000a2decb5a691","bff8c8bffbf5f302a30ccb1c0557dae477892d50a80eecfe393bd89bac7fb41d","43ba4f2fa8c698f5c304d21a3ef596741e8e85a810b7c1f9b692653791d8d97a","4d4927cbee21750904af7acf940c5e3c491b4d5ebc676530211e389dd375607a","72105519d0390262cf0abe84cf41c926ade0ff475d35eb21307b2f94de985778","8a97e578a9bc40eb4f1b0ca78f476f2e9154ecbbfd5567ee72943bab37fc156a","a58abf1f5c8feb335475097abeddd32fd71c4dc2065a3d28cf15cacabad9654a","ccf6dd45b708fb74ba9ed0f2478d4eb9195c9dfef0ff83a6092fa3cf2ff53b4f","2d7db1d73456e8c5075387d4240c29a2a900847f9c1bff106a2e490da8fbd457","2b15c805f48e4e970f8ec0b1915f22d13ca6212375e8987663e2ef5f0205e832","f22d05663d873ee7a600faf78abb67f3f719d32266803440cf11d5db7ac0cab2","d93c544ad20197b3976b0716c6d5cd5994e71165985d31dcab6e1f77feb4b8f2","35069c2c417bd7443ae7c7cafd1de02f665bf015479fec998985ffbbf500628c","a8b1c79a833ee148251e88a2553d02ce1641d71d2921cce28e79678f3d8b96aa","126d4f950d2bba0bd45b3a86c76554d4126c16339e257e6d2fabf8b6bf1ce00c","9e21f8e2c0cfea713a4a372f284b60089c0841eb90bf3610539d89dbcd12d65a","045b752f44bf9bbdcaffd882424ab0e15cb8d11fa94e1448942e338c8ef19fba","2894c56cad581928bb37607810af011764a2f511f575d28c9f4af0f2ef02d1ab","0a72186f94215d020cb386f7dca81d7495ab6c17066eb07d0f44a5bf33c1b21a","7fa117f0f4f132ba132794982a35c840287997ee186753f78abe48508812c238","6ce54b2cfe4cf91138e2f5f114fe222a8819968336385cbcafd26ca89ebd4f50","b612fc66f534bd447bb1d5d52a29217a80780e1d57633875c9d8a333503f378a","0e8aef93d79b000deb6ec336b5645c87de167168e184e84521886f9ecc69a4b5","512a95a23e912bd68cdd9c4189962ab1b9b4dd6ea2f410e3fb1bf6e3e1e051bf","d90b9f1520366d713a73bd30c5a9eb0040d0fb6076aff370796bc776fd705943",{"version":"736a8712572e21ee73337055ce15edb08142fc0f59cd5410af4466d04beff0f9","affectsGlobalScope":true},"bef86adb77316505c6b471da1d9b8c9e428867c2566270e8894d4d773a1c4dc2","a7d72cf676f5117df919b8a73da2cfa20cf9939fdb263fd496fb77f95c35335d","b01bd582a6e41457bc56e6f0f9de4cb17f33f5f3843a7cf8210ac9c18472fb0f","0a437ae178f999b46b6153d79095b60c42c996bc0458c04955f1c996dc68b971","a3e7d932dc9c09daa99141a8e4800fc6c58c625af0d4bbb017773dc36da75426","43e96a3d5d1411ab40ba2f61d6a3192e58177bcf3b133a80ad2a16591611726d","219e5e67ea4630410167444a715ecc172d9462b7910cd066eca18f6ed27d907b","ca921bf56756cb6fe957f6af693a35251b134fb932dc13f3dfff0bb7106f80b4","fee92c97f1aa59eb7098a0cc34ff4df7e6b11bae71526aca84359a2575f313d8","acfbb7b38e876b43cb07d0c8bd1a2e84dd641d9d2b67d772e8977337398bfff5","2ab6d334bcbf2aff3acfc4fd8c73ecd82b981d3c3aa47b3f3b89281772286904","d07cbc787a997d83f7bde3877fec5fb5b12ce8c1b7047eb792996ed9726b4dde","6ac6715916fa75a1f7ebdfeacac09513b4d904b667d827b7535e84ff59679aff","268c6788d4791a66cc5c153c41d2313d6f3c0d3e35edce3ce05e21c31f972ae0","b83cb14474fa60c5f3ec660146b97d122f0735627f80d82dd03e8caa39b4388c","f374cb24e93e7798c4d9e83ff872fa52d2cdb36306392b840a6ddf46cb925cb6","6ad71551fba5dbf440780090c82f5e0a7b64f602e0f0f678317659f12131f253","7274fbffbd7c9589d8d0ffba68157237afd5cecff1e99881ea3399127e60572f","b73cbf0a72c8800cf8f96a9acfe94f3ad32ca71342a8908b8ae484d61113f647","bae6dd176832f6423966647382c0d7ba9e63f8c167522f09a982f086cd4e8b23","e927c2c13c4eaf0a7f17e6022eee8519eb29ef42c4c13a31e81a611ab8c95577","fcafff163ca5e66d3b87126e756e1b6dfa8c526aa9cd2a2b0a9da837d81bbd72","70246ad95ad8a22bdfe806cb5d383a26c0c6e58e7207ab9c431f1cb175aca657","f00f3aa5d64ff46e600648b55a79dcd1333458f7a10da2ed594d9f0a44b76d0b","772d8d5eb158b6c92412c03228bd9902ccb1457d7a705b8129814a5d1a6308fc","45490817629431853543adcb91c0673c25af52a456479588b6486daba34f68bb","802e797bcab5663b2c9f63f51bdf67eff7c41bc64c0fd65e6da3e7941359e2f7","8b4327413e5af38cd8cb97c59f48c3c866015d5d642f28518e3a891c469f240e","cd767eea328a0ed87d2e028147a022f209fadf420199254253a6cffe8e234df8","752513f35f6cff294ffe02d6027c41373adf7bfa35e593dbfd53d95c203635ee","6c800b281b9e89e69165fd11536195488de3ff53004e55905e6c0059a2d8591e","7d4254b4c6c67a29d5e7f65e67d72540480ac2cfb041ca484847f5ae70480b62","1ee834bfd4a06aafdc46f5542d089565a26e031ebf854ef5b08cb75ec42d68fb","8c901126d73f09ecdea4785e9a187d1ac4e793e07da308009db04a7283ec2f37","db97922b767bd2675fdfa71e08b49c38b7d2c847a1cc4a7274cb77be23b026f1","e2f64b40fe8d3a77d5462dc4a75ead61c76bf464208b506c1465dac4e195f710","94fe3281392e1015b22f39535878610b4fa6f1388dc8d78746be3bc4e4bb8950","2652448ac55a2010a1f71dd141f828b682298d39728f9871e1cdf8696ef443fd","e3a9871a4a736910b0b77bc063d5f9c272578b3743269ebe93b275b0c52a9815","120599fd965257b1f4d0ff794bc696162832d9d8467224f4665f713a3119078b","5433f33b0a20300cca35d2f229a7fc20b0e8477c44be2affeb21cb464af60c76","db036c56f79186da50af66511d37d9fe77fa6793381927292d17f81f787bb195","bd4131091b773973ca5d2326c60b789ab1f5e02d8843b3587effe6e1ea7c9d86","c7f6485931085bf010fbaf46880a9b9ec1a285ad9dc8c695a9e936f5a48f34b4","73a39452c4b498728757c4a7f756a3b9bed1f8a02c278cb803665cc7897e6930","6ac6715916fa75a1f7ebdfeacac09513b4d904b667d827b7535e84ff59679aff","0427df5c06fafc5fe126d14b9becd24160a288deff40e838bfbd92a35f8d0d00","8514c62ce38e58457d967e9e73f128eedc1378115f712b9eef7127f7c88f82ae","191a32cecf67da01119a7bce3132228fa9388e2bbfc5c1662542e71f9f20134a","49c346823ba6d4b12278c12c977fb3a31c06b9ca719015978cb145eb86da1c61","bfac6e50eaa7e73bb66b7e052c38fdc8ccfc8dbde2777648642af33cf349f7f1","92f7c1a4da7fbfd67a2228d1687d5c2e1faa0ba865a94d3550a3941d7527a45d","f53b120213a9289d9a26f5af90c4c686dd71d91487a0aa5451a38366c70dc64b","83fe880c090afe485a5c02262c0b7cdd76a299a50c48d9bde02be8e908fb4ae6","0a372c2d12a259da78e21b25974d2878502f14d89c6d16b97bd9c5017ab1bc12","57d67b72e06059adc5e9454de26bbfe567d412b962a501d263c75c2db430f40e","6511e4503cf74c469c60aafd6589e4d14d5eb0a25f9bf043dcbecdf65f261972","885e0c913a60577fa4827e5412055011a7532124fd9e054febb6808b0d7fec3d","6e2261cd9836b2c25eecb13940d92c024ebed7f8efe23c4b084145cd3a13b8a6","a67b87d0281c97dfc1197ef28dfe397fc2c865ccd41f7e32b53f647184cc7307","771ffb773f1ddd562492a6b9aaca648192ac3f056f0e1d997678ff97dbb6bf9b","232f70c0cf2b432f3a6e56a8dc3417103eb162292a9fd376d51a3a9ea5fbbf6f","d7ed1f4bd5589cb08f3af26839a0dc2472e4d1a3c380e167f0186b1f5e7c27d3","cfb5f0ab72180f4e0b9ed1534847a63d5394b9a8ee685ae149d25fd53f1aec66","8a0e762ceb20c7e72504feef83d709468a70af4abccb304f32d6b9bac1129b2c","26f83053ec70baea288b5281deb2cf11f6f9ea79bc654db1a6602b0b7ec085ff","d682336018141807fb602709e2d95a192828fcb8d5ba06dda3833a8ea98f69e3","6124e973eab8c52cabf3c07575204efc1784aca6b0a30c79eb85fe240a857efa","51b1709e7ad186919a0e30237a8607100143a86d28771b3d3f046359aca1e65c","74b2a5e5197bd0f2e0077a1ea7c07455bbea67b87b0869d9786d55104006784f","4a7baeb6325920044f66c0f8e5e6f1f52e06e6d87588d837bdf44feb6f35c664","6dcf60530c25194a9ee0962230e874ff29d34c59605d8e069a49928759a17e0a","1a42d2ec31a1fe62fdc51591768695ed4a2dc64c01be113e7ff22890bebb5e3f","4b20fcf10a5413680e39f5666464859fc56b1003e7dfe2405ced82371ebd49b6","f0f3f57e29b40e9cb0c4b155a96de2f61e51700d2c335dd547ef3c85e668c6a8","f7d628893c9fa52ba3ab01bcb5e79191636c4331ee5667ecc6373cbccff8ae12","a169ba2d40cc94a500759aa86eded1f63395252bb7508a8b67dc681ff413ac8d","6a76daf108400ca1333e325772f24f40ebdde2120ef68f8c87d7a1adf0257541","7fa321c806b965bac02883573db0b1466e5edd14c479d156079eb08f1086f1d1","01698747a0d3c3ebf261865f9f912658aff9b726f7ebda11e19222725cfb0965","9b06ce81ad598c9c6b011cb66182fa66575ad6bd1f8f655830a6a0223a197ab7","d9d32f94056181c31f553b32ce41d0ef75004912e27450738d57efcd2409c324",{"version":"a3128a84a9568762a2996df79717d92154d18dd894681fc0ab3a098fa7f8ee3b","affectsGlobalScope":true},"4c12b845a35c0f753c1cf29d7d042d4da0206b1ba040a9bfff193a086bcdc248","2896c2e673a5d3bd9b4246811f79486a073cbb03950c3d252fba10003c57411a","9252d498a77517aab5d8d4b5eb9d71e4b225bbc7123df9713e08181de63180f6","c3b0db2267ff477aa00683219dd8738cd24a930da4df23fecb5910f27e7e49b3","77497ec7d02338725444582c8ae7eb2085243a9f8c4113ca40b9b4fd941f2319","de9d2df7663e64e3a91bf495f315a7577e23ba088f2949d5ce9ec96f44fba37d",{"version":"0c7c947ff881c4274c0800deaa0086971e0bfe51f89a33bd3048eaa3792d4876","affectsGlobalScope":true},{"version":"db01d18853469bcb5601b9fc9826931cc84cc1a1944b33cad76fd6f1e3d8c544","affectsGlobalScope":true},{"version":"a8f8e6ab2fa07b45251f403548b78eaf2022f3c2254df3dc186cb2671fe4996d","affectsGlobalScope":true},"c7af78a2ea7cb1cd009cfb5bdb48cd0b03dad3b54f6da7aab615c2e9e9d570c5","1ee45496b5f8bdee6f7abc233355898e5bf9bd51255db65f5ff7ede617ca0027","1d079c37fa53e3c21ed3fa214a27507bda9991f2a41458705b19ed8c2b61173d",{"version":"429aacaf3955390f06048784af81b187ef273825d1f290b9e35684b51346b11b","affectsGlobalScope":true},{"version":"1fc1b0665312ddb116e35ddd842ce12c302eaf82069efdc18ed21ae2f815dc68","affectsGlobalScope":true},"dd29296855b5611498bce78ad2ed990653e260fdba079cee10e9c4eba3a3bc82","ccc04769326a912513ca626f611d49429755e2101ea7b5203b96aa8f556c819d","5af7c35a9c5c4760fd084fedb6ba4c7059ac9598b410093e5312ac10616bf17b","71e1687de45bc0cc54791abb165e153ce97a963fb4ece6054648988f586c187f","3c8c1edb7ed8a842cb14d9f2ba6863183168a9fc8d6aa15dec221ebf8b946393","0a6e1a3f199d6cc3df0410b4df05a914987b1e152c4beacfd0c5142e15302cac","ec3c1376b4f34b271b1815674546fe09a2f449b0773afd381bbce7eb2f96a731","c2a262a3157e868d279327daf428dd629bd485f825800c8e62b001e6c879aff6","f7e84f314f9276b44b707289446303db8ef34a6c2c6d6b08d03a76e168367072","2b493706eb7879d42a8e8009379292b59827d612ab3a275bc476f87e60259c79","5542628b04d7bd4e0cd4871b6791b3b936a917ac6b819dcd20487f040acb01f1","f07b335f87cfac999fc1da00dfbc616837ced55be67bcaa41524d475b7394554",{"version":"938326adb4731184e14e17fc57fca2a3b69c337ef8d6c00c65d73472fe8feca4","affectsGlobalScope":true},"f7cd27bf3ead5df46badb5e57a9020f7ba8ac99d7f1c6070fc6cd5c054059591","8699b902ee542e9d31018bc69e28edbfc653fa1ca564e9cc2e5f5ff2556ec0d8","9971931daaf18158fc38266e838d56eb5d9d1f13360b1181bb4735a05f534c03","50cf7a23fc93928995caec8d7956206990f82113beeb6b3242dae8124edc3ca0","0cf580eeb7ea345414e7f9cf562da74786b5a4edf0dab2fdb18d2cfc415e4694","5d85e1a0df93fe813d004185bcb1fa24b3f1ae251955c46b24b51f4abd6cdf99","96a6a661235adf6b41d55da500a7e9179608897745078681230a03e57ecbbaf2","0c5b705d31420477189618154d1b6a9bb62a34fa6055f56ade1a316f6adb6b3a","352031ac2e53031b69a09355e09ad7d95361edf32cc827cfe2417d80247a5a50","853b8bdb5da8c8e5d31e4d715a8057d8e96059d6774b13545c3616ed216b890c","64a633b5934f346e3e655c040170c68638809f4c48183dd93fb4bb220ec34650","88f830077d651fc2b522959ffb5a64f7659557e841b36c49fb7ef67976f4f6d4","476a3b1fb75bdc87b3dd9e3eff4f0ac4b014200f12b7bc7468c889325ce00700","c363b57a3dfab561bfe884baacf8568eea085bd5e11ccf0992fac67537717d90","1757a53a602a8991886070f7ba4d81258d70e8dca133b256ae6a1a9f08cd73b3","084c09a35a9611e1777c02343c11ab8b1be48eb4895bbe6da90222979940b4a6","4b3049a2c849f0217ff4def308637931661461c329e4cf36aeb31db34c4c0c64","6245aa515481727f994d1cf7adfc71e36b5fc48216a92d7e932274cee3268000","d542fb814a8ceb7eb858ecd5a41434274c45a7d511b9d46feb36d83b437b08d5","660ce583eaa09bb39eef5ad7af9d1b5f027a9d1fbf9f76bf5b9dc9ef1be2830e","b7d9ca4e3248f643fa86ff11872623fdc8ed2c6009836bec0e38b163b6faed0c","ac7a28ab421ea564271e1a9de78d70d68c65fab5cbb6d5c5568afcf50496dd61","d4f7a7a5f66b9bc6fbfd53fa08dcf8007ff752064df816da05edfa35abd2c97c","1f38ecf63dead74c85180bf18376dc6bc152522ef3aedf7b588cadbbd5877506","24af06c15fba5a7447d97bcacbcc46997c3b023e059c040740f1c6d477929142","facde2bec0f59cf92f4635ece51b2c3fa2d0a3bbb67458d24af61e7e6b8f003c","4669194e4ca5f7c160833bbb198f25681e629418a6326aba08cf0891821bfe8f","f919471289119d2e8f71aba81869b01f30f790e8322cf5aa7e7dee8c8dadd00a","62782b3de41dc24565b5bc853b0c5380c38ad9e224d2d08c1f96c7d7ef656896","a95cd11c5c8bc03eab4011f8e339a48f9a87293e90c0bf3e9003d7a6f833f557","e9bc0db0144701fab1e98c4d595a293c7c840d209b389144142f0adbc36b5ec2","9d884b885c4b2d89286685406b45911dcaab03e08e948850e3e41e29af69561c","1d7ee0c4eb734d59b6d962bc9151f6330895067cd3058ce6a3cd95347ef5c6e8","57c68c4566b0310df6cdf4732e226e5047a473e676b7391578e6100694791825","5af6f112c4f37490d845f278244eb21e5a8de39cd9be27cd2b80dd26ab25e1bb","6b13232c187a7c77853e5bcec7379ef40547cdbdf66dad65a6e27e9fee13e35a","56c17f449fc5a307b0417e66af3a63312b168a708f50a5dbcf1a174efcb4cb56","55f15aac2be856ebe5d841832e4f4bb0b2e6c06372e5d9674aa649171ac47060","61e269daca280af4623fa9160f7f920dc6337f3bd4a59ae3fb2378f4115edb7f","11268e3663817a8c0cdb40cb2056dcde94488add3e08414ee0ae264af4dfb938","c47681a932d7e246eef06f24ba726de4f302beb0ee1e871cb3eaab18ca25a588","9b540af3c995ed9a0eef52106d76fad967a3ea9163488444605d6863be1f26d1","3c9e726e73c52f74e1803f2da7c86ae821aaeccd607ca4dd5aff1c0157388eb9","fc41e43e3f16408d2b78b2a77c5afd00bc740aea00426cc388c99b015859b481","92bbd0fb6dcb1ff85c96bf485f677604b3899409b19eb23314fe84a8e471e0dd","846a313a6c550c730ce881ef0b8372e908fb988f6d5f04effad1a026c567ec09","5ea24977fbfe839425c11b119c8989a9ea22000e41bf16a27d469a08ce6dc725","1d17e17c18fbaa33a901ca0f5838a98419948e1965f2fff92d198e259d317dbc","4675d071009677a697d27d2a535c60d1cef14a143704fe72454c3c3d57fc741a","7b38b4297b15becb141203866f0418cfc44e23e551c567fb3164712384258fb7","10e45ce464a6c8eb3073660adece64cf907add35d78159d3054de597d19c1aef","fe9ac6f9add89accf3783e35aaa7abf943a1bcec3b9b33494c80867aa1e3ad86","0fcd902e680470eba590afe525713a22c68c0877577d9a8f6f20efeaf1cb0eaa","b4d518ad860d75dc2d66779b795eab4d947d94c94a9f07a3c404030a0444de60","611b18058f5d54ac4af79dc486619b988107734244860f51ac4146cfe0124cc0","7b57d9286e72fc95cef8fae00f02e720d2561f2be7214b5ad2d57a0a73805d55","75e2a5f08f4fa281b03152715248b40792d37f5511caf9ac73d522d067ec62f1",{"version":"d76900a885a4da0c984184f1f45cd2dbe4c36c0ede064608c8cd5fb6171b642d","signature":"a964a3150eea181d7af2d1a08730720580f63551c2d9e87b7e0b924e62cd1ab7"},"989deb0a01859e5d8a0cdd53d4db20ed970de3960262e735ee1bcb8017748f73","0df7cce539005e3b4d89db6c366e273ae8db866efd15526b37b0c87a6ea88b83","5ab0efccaa6d514675cf4a4fd16cb912707d3dd79171b31d5acb59e8e557d681","d46d8ac3c6ac4058fe0bc1e5aaa3c480acf648161ce0e9f8f725958f3325b805","457995f666fd371e8ed89aa27018752f0eeab70656db733cc8e0558997f71638","1f725fd17e10856c5cb0aeabc20d932fa798644361ef6cd338b4533cc2483016",{"version":"982798f5b69533a39e1a6689f6583acc82554486299fe26da18aa244f468c65c","signature":"6935a2b727e41badb7a2cca85d400aadf8ff7202e754a48ff40ecb1c81b9a46a"},"1f0914ca057e799130da87a78d48021657aba67e01fcbcb50b099944ee2ea864",{"version":"6231095d0b356894ceec8856ce4e354a38a773a62067978f3af9c478acbcf2e9","affectsGlobalScope":true},"66754e21a2ac3ffc0eb3fc55cf5c33deb2c115b726fb2c4368b870c5e85106ce","ccd9f8f7c8760d8eb0c0c112c772a9756d59365a61fd5cc102a889fed79d0076","d7ccbcf0e92d0209f499729768c791fbc278ecad02c3f596db5b519eb4f5d496","85542ea0f889f8993e6b4631c541640c17c230bf5cf18d483184de9105536b4d","8cc2eed7caa0e187fae67a1e7fdb4da79079489744c6e5be9e0839d258fd5995","aaf2cc4016c33c836fcca0dbe20d7a97bf17cafeb581a57a62267b1c38930bd4","fa208d5a5ab6d20b64122998b074707dea08d12ed619652955f77df958d85786","61f5aecbe09eda422f804ebe6ae63753bdeda09a6c26e9bedeb6d29843d4ac03","57eda4c4c04a1dca45c62857326882ce9cc948c4b52973c0e3c3b7e4c3fa3990","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","7f82ef88bdb67d9a850dd1c7cd2d690f33e0f0acd208e3c9eba086f3670d4f73",{"version":"ccfd8774cd9b929f63ff7dcf657977eb0652e3547f1fcac1b3a1dc5db22d4d58","affectsGlobalScope":true},"72e9425f1ba1eb7fd8122d08f48848a0d56de1cd4c7b51f26dc2612bd26c7241",{"version":"841784cfa9046a2b3e453d638ea5c3e53680eb8225a45db1c13813f6ea4095e5","affectsGlobalScope":true},"646ef1cff0ec3cf8e96adb1848357788f244b217345944c2be2942a62764b771","22583759d0045fdf8d62c9db0aacba9fd8bddde79c671aa08c97dcfd4e930cc6",{"version":"12e21718a0fcc90c689d78c80b30f5b7a3d6d5efa98a97f11890d8157789e7b0","signature":"163a9b35d37a55d034d56997afd44c64a90e31d3cc70867d5c04775d188ce3ff"},"6f9aa68dc7c794c12df35d2f050a017af8a3f9475b0013fefa8dc91ceb206a85","dfaec5f62ea0479c5d4b259ec74e4c4bd08b134785b67acd6320a7a486c719a2","daab389d47cbcfb455d44ecae5f7d9f00416546600748374a5f110d241db3c92","9e2a20d6326e2610caa5cc64dcfaaed1f2019cd3e9078b7759a7c6f2b472d570","68925cfeca9ee541f7790eb3ab4b8193d9bf48ccd2b7c5b82901cbf2adc533e8","9986fdf64bd0011ce175f6a9ae0892da8f931fcaa64b015a38949968998e5ebb","721ea295254924b265f7b15378f0fbb88113a3ea522b02d8b8f22cd29cf40a39","734b14ae502e23fed02c0eeb90a8513efd27131e5e445c87d9b5adb0a9799425","6f2773e426c55f9b403e35b82edb81ed9b52d09eb3083de6292265f9166d3595","a3d3f704c5339a36da3ca8c62b29072f87e86c783b8452d235992142ec71aa2d",{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true},"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","95da3c365e3d45709ad6e0b4daa5cdaf05e9076ba3c201e8f8081dd282c02f57","f60e3e3060207ac982da13363181fd7ee4beecc19a7c569f0d6bb034331066c2","17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","798367363a3274220cbed839b883fe2f52ba7197b25e8cb2ac59c1e1fd8af6b7","fe62b82c98a4d5bca3f8de616b606d20211b18c14e881bb6856807d9ab58131b","1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","844ab83672160ca57a2a2ea46da4c64200d8c18d4ebb2087819649cad099ff0e"],"options":{"allowSyntheticDefaultImports":true,"composite":false,"declarationMap":false,"emitDeclarationOnly":false,"esModuleInterop":true,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"skipLibCheck":true,"strict":true,"target":1,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[90,95],[90,95,381,382,383],[90,95,381,382],[90,95,381],[90,95,395],[90,95,394,395],[90,95,394,395,396,397,398,399,400,401,402],[90,95,394,395,396],[60,90,95,403],[60,90,95,254,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422],[90,95,403,404],[60,90,95],[60,90,95,254],[90,95,403],[90,95,403,404,413],[90,95,403,404,406],[66,90,95],[63,64,65,66,67,70,71,72,73,74,75,76,77,90,95],[62,90,95],[69,90,95],[63,64,65,90,95],[63,64,90,95],[66,67,69,90,95],[64,90,95],[90,95,477],[90,95,475,476],[60,61,78,79,90,95,146],[90,95,491,497],[90,95,492,493,494,495,496],[90,95,497],[69,90,95,474],[90,95,100,142,500],[90,92,95],[90,94,95],[90,95,100,127],[90,95,96,107,108,115,124,135],[90,95,96,97,107,115],[86,87,90,95],[90,95,98,136],[90,95,99,100,108,116],[90,95,100,124,132],[90,95,101,103,107,115],[90,95,102],[90,95,103,104],[90,95,107],[90,95,106,107],[90,94,95,107],[90,95,107,108,109,124,135],[90,95,107,108,109,124],[90,95,107,110,115,124,135],[90,95,107,108,110,111,115,124,132,135],[90,95,110,112,124,132,135],[90,95,107,113],[90,95,114,135,140],[90,95,103,107,115,124],[90,95,116],[90,95,117],[90,94,95,118],[90,95,119,134,140],[90,95,120],[90,95,121],[90,95,107,122],[90,95,122,123,136,138],[90,95,107,124,125,126],[90,95,124,126],[90,95,124,125],[90,95,127],[90,95,128],[90,95,107,130,131],[90,95,130,131],[90,95,100,115,124,132],[90,95,133],[95],[88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[90,95,115,134],[90,95,110,121,135],[90,95,100,136],[90,95,124,137],[90,95,138],[90,95,139],[90,95,100,107,109,118,124,135,138,140],[90,95,124,141],[90,95,107,124,132,142,502,503,506,507,508],[90,95,508],[60,61,90,95,145,146,147],[60,90,95,145,146],[60,61,90,95,146],[60,79,90,95],[60,90,95,389,497],[60,90,95,497],[60,90,95,144,364],[60,90,95,143,364],[57,58,59,90,95],[90,95,511,550],[90,95,511,535,550],[90,95,550],[90,95,511],[90,95,511,536,550],[90,95,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549],[90,95,536,550],[90,95,469,470],[90,95,469,470,471,472],[90,95,468,473],[82,90,95,160,161,162,164,368],[82,90,95,150,193,195,197,198,201,368],[82,90,95,150,166,175,176,177,178,179,338,368],[90,95,368],[90,95,161,248,318,327,345],[82,90,95],[90,95,148,345],[90,95,204],[90,95,150,203,368],[90,95,110,228,248,277],[90,95,110,241,258,327,344],[90,95,110,294],[90,95,332],[90,95,331,332,333],[90,95,331],[82,85,90,95,110,148,157,158,161,165,166,176,180,181,182,287,328,329,364,368],[81,82,90,95,163,189,193,194,199,200,368],[81,90,95,163],[81,90,95,182,189,226,368],[81,90,95],[81,82,90,95,163,164],[81,90,95,196],[90,95,158,330,337],[90,95,121,254,345],[90,95,254,345],[60,90,95,249],[90,95,323],[90,95,177,288,289,290],[90,95,288,291,292],[90,95,288,292],[60,90,95,163,371],[60,90,95,163],[90,95,373,374],[60,90,95,366,375],[90,95,110],[90,95,110,149,166,171,288,298,310,318,334,335,368],[90,95,157,336],[90,95,364],[90,95,369],[60,90,95,228,244,257,267,269,344],[90,95,121,228,244,266,267,268,344],[90,95,260,261,262,263,264,265],[90,95,262],[90,95,266],[90,95,310,341],[90,95,110,149,366],[90,95,253],[90,94,95,252],[90,95,149,172,183,237,238,240,241,242,243,283,288,344,347],[90,95,183,238,288,292],[90,95,241,344],[60,90,95,241,250,251,253,255,256,257,258,259,270,271,272,273,274,275,276,344,345],[90,95,235],[90,95,110,121,149,150,171,183,184,216,242,283,286,287,292,310,318,340,364,368],[90,95,344],[90,94,95,149,161,238,239,242,287,340,342,343],[90,95,241],[90,94,95,171,230,231,232,233,234,235,236,237,240,344,345],[90,95,110,149,150,230,231,350],[90,95,149,161,238,287,288,310,340,344],[90,95,110,150,368],[90,95,110,124,149,150,347],[90,95,110,121,135,148,149,150,163,166,172,183,184,186,214,216,237,242,284,288,298,299,301,303,306,307,308,309,318,339,340,345,347,348,368],[90,95,110,124],[81,82,83,84,90,95,180,339,347,364,366,367],[81,90,95,110,124,135,201,202,204,205,206,207],[90,95,121,135,148,193,202,211,214,215,237,288,299,310,318,340,345,347,353,354,360,361],[90,95,157,158,180,287,329,340,368],[83,90,95,110,135,166,237,347,358,368],[90,95,227],[90,95,110,209,210,315],[90,95,347,368],[90,95,238,239],[90,95,237,242,339,366],[90,95,110,121,187,193,211,214,215,310,347,360,363],[90,95,110,157,158,193,311],[82,90,95,186,313,339,368],[90,95,110,135,368],[90,95,110,163,185,186,187,198,208,312,314,339,368],[85,90,95,183,242,317,364,366],[90,95,110,121,135,157,158,165,166,172,184,215,216,237,284,288,299,301,310,318,339,340,345,346,347,353,354,355,357,359,366],[90,95,110,124,158,315,347,360,362],[90,95,152,153,154,155,156],[90,95,302,348],[90,95,304],[90,95,302],[90,95,304,305],[90,95,110,149,166,171],[83,90,95,110,121,150,172,183,216,242,296,297,318,347,364,366,369],[90,95,110,121,135,149,173,177,237,297,346],[90,95,168,169],[90,95,110,166,168,172],[90,95,167,169],[90,95,170],[90,95,168,202],[90,95,168,217],[90,95,168],[90,95,213,346,348],[90,95,212],[90,95,202,345,346],[90,95,300,346],[90,95,202,345],[90,95,283],[90,95,149,172,225,228,237,238,244,247,278,280,282,288,317,347],[90,95,219,222,223,224,245,246,292],[60,90,95,145,146,147,254,279],[60,90,95,145,146,147,254,279,281],[90,95,326],[90,95,161,241,242,253,258,288,317,319,320,321,322,324,325,328,339,344,350,368],[90,95,292],[90,95,296],[90,95,110,172,218,293,295,298,317,347,364,366],[90,95,219,220,221,222,223,224,245,246,292,365],[85,90,95,110,121,135,149,168,184,202,216,237,242,315,316,318,339,340,364,368],[90,95,285,340,350,353],[90,95,110,348,368],[90,95,230,241],[90,95,229],[90,95,284,350],[90,95,230,349,368],[90,95,110,149,173,285,350,351,352,368],[60,90,95,288,289,291],[90,95,188],[60,90,95,345],[60,85,90,95,216,242,364,366],[60,83,90,95],[60,90,95,373],[60,90,95,121,135,200,366,369,370,372,375],[90,95,149,163,345],[90,95,345,356],[60,90,95,108,110,121,189,195,364,365,369,373],[90,95,100],[90,95,190,191,192],[90,95,190],[60,90,95,110,112,121,142,143,144,145,147,148,150,184,266,363,366,369],[90,95,375],[90,95,142,503,504,505],[90,95,142],[90,95,124,142,503],[68,90,95],[90,95,384],[60,90,95,384,389,390],[90,95,384,385,386,387,388],[60,90,95,384,385],[60,90,95,384],[90,95,384,386],[90,95,124,142],[90,95,458],[90,95,458,459,460,461,462,463],[60,80,90,95,456],[60,90,95,376,377,378,379,380,392,393,428,430,438,447,448,449,450,455],[60,90,95,379,391,451,452,453,454],[60,90,95,379],[60,90,95,379,391],[60,90,95,441],[60,90,95,435],[60,90,95,423,425,433],[60,90,95,423,425,426],[60,90,95,423,425,426,431],[60,90,95,379,380,391],[60,90,95,440,441],[60,90,95,391,439,442,443,444,445],[60,61,90,95,146,456,465],[60,90,95,423,425,426,431,432,434,436,437],[60,90,95,423,425,426,427],[60,90,95,423,425,426,429],[60,90,95,379,391,487],[60,90,95,446],[90,95,464],[90,95,424,485],[90,95,425],[90,95,487],[90,95,424,425],[60]],"referencedMap":[[195,1],[381,1],[384,2],[383,3],[382,4],[400,5],[396,6],[403,7],[398,8],[399,1],[401,5],[397,8],[394,1],[402,8],[395,1],[416,9],[423,10],[413,11],[422,12],[420,11],[414,9],[415,13],[406,11],[404,14],[421,15],[417,14],[419,11],[418,14],[412,14],[411,11],[405,11],[407,16],[409,11],[410,11],[408,11],[76,1],[73,1],[72,1],[67,17],[78,18],[63,19],[74,20],[66,21],[65,22],[75,1],[70,23],[77,1],[71,24],[64,1],[478,25],[477,26],[476,19],[80,27],[62,1],[490,1],[492,28],[493,28],[494,28],[491,1],[497,29],[495,30],[496,30],[475,31],[498,1],[499,1],[501,32],[500,1],[92,33],[93,33],[94,34],[95,35],[96,36],[97,37],[88,38],[86,1],[87,1],[98,39],[99,40],[100,41],[101,42],[102,43],[103,44],[104,44],[105,45],[106,46],[107,47],[108,48],[109,49],[91,1],[110,50],[111,51],[112,52],[113,53],[114,54],[115,55],[116,56],[117,57],[118,58],[119,59],[120,60],[121,61],[122,62],[123,63],[124,64],[126,65],[125,66],[127,67],[128,68],[129,1],[130,69],[131,70],[132,71],[133,72],[90,73],[89,1],[142,74],[134,75],[135,76],[136,77],[137,78],[138,79],[139,80],[140,81],[141,82],[508,83],[507,84],[59,1],[146,85],[61,12],[147,86],[145,12],[281,87],[79,88],[510,89],[509,90],[143,91],[144,92],[57,1],[60,93],[279,12],[254,12],[535,94],[536,95],[511,96],[514,96],[533,94],[534,94],[524,94],[523,97],[521,94],[516,94],[529,94],[527,94],[531,94],[515,94],[528,94],[532,94],[517,94],[518,94],[530,94],[512,94],[519,94],[520,94],[522,94],[526,94],[537,98],[525,94],[513,94],[550,99],[549,1],[544,98],[546,100],[545,98],[538,98],[539,98],[541,98],[543,98],[547,100],[548,100],[540,100],[542,100],[377,1],[378,1],[424,1],[468,1],[58,1],[469,1],[471,101],[473,102],[472,101],[470,20],[474,103],[163,104],[199,105],[339,106],[194,107],[182,1],[178,1],[161,1],[328,108],[352,109],[162,1],[329,110],[203,111],[204,112],[278,113],[325,114],[295,115],[333,116],[334,117],[332,118],[331,1],[330,119],[201,120],[164,121],[226,1],[227,122],[181,1],[183,123],[165,124],[216,123],[299,123],[84,123],[197,125],[196,1],[338,126],[367,1],[177,1],[255,127],[256,128],[249,12],[258,1],[259,13],[250,129],[271,12],[324,130],[323,1],[251,12],[291,131],[289,132],[290,133],[372,134],[371,135],[375,136],[374,137],[229,1],[81,1],[335,138],[336,139],[337,140],[185,1],[176,141],[148,1],[82,142],[270,143],[269,144],[260,1],[261,1],[268,1],[263,1],[266,145],[262,1],[264,146],[267,147],[265,146],[160,1],[174,1],[175,1],[206,1],[276,13],[297,13],[342,148],[341,1],[284,1],[150,149],[252,150],[253,151],[244,152],[234,1],[275,153],[235,154],[277,155],[273,156],[272,1],[274,1],[288,157],[343,158],[344,159],[236,160],[241,161],[232,162],[320,163],[149,164],[215,165],[310,166],[173,167],[368,168],[369,107],[207,1],[208,169],[362,170],[205,1],[361,171],[85,1],[359,172],[184,1],[228,173],[355,1],[166,1],[167,1],[211,174],[180,1],[348,175],[240,176],[340,177],[239,1],[210,1],[311,178],[312,179],[179,1],[314,180],[316,181],[315,182],[187,1],[209,167],[318,183],[360,184],[363,185],[151,1],[154,1],[152,1],[156,1],[153,1],[155,1],[157,186],[159,1],[303,187],[302,1],[308,188],[304,189],[307,190],[306,190],[309,188],[305,189],[172,191],[298,192],[347,193],[238,1],[345,158],[257,158],[158,1],[237,194],[169,195],[170,196],[171,197],[225,198],[319,198],[217,198],[300,199],[218,199],[202,200],[168,1],[214,201],[213,202],[212,203],[301,204],[346,205],[248,206],[283,207],[247,208],[280,209],[282,210],[327,211],[326,212],[322,213],[294,214],[296,215],[293,216],[317,217],[287,1],[286,218],[321,1],[349,219],[233,138],[231,220],[230,221],[285,222],[350,223],[351,223],[353,224],[246,12],[292,225],[200,1],[189,226],[242,1],[224,12],[223,227],[365,228],[222,229],[83,1],[220,12],[221,12],[370,1],[188,1],[219,230],[373,231],[186,232],[243,61],[354,61],[313,1],[357,233],[356,1],[245,12],[366,234],[198,235],[193,236],[192,1],[191,237],[190,1],[364,238],[376,239],[506,240],[503,241],[505,242],[504,1],[502,1],[69,243],[68,1],[390,244],[391,245],[389,246],[386,247],[385,248],[388,249],[387,247],[358,250],[11,1],[12,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[4,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[5,1],[30,1],[31,1],[32,1],[33,1],[6,1],[37,1],[34,1],[35,1],[36,1],[38,1],[7,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[8,1],[49,1],[46,1],[47,1],[48,1],[50,1],[9,1],[51,1],[52,1],[53,1],[54,1],[55,1],[1,1],[10,1],[56,1],[459,251],[460,251],[461,251],[462,251],[463,251],[464,252],[458,1],[457,253],[456,254],[455,255],[454,256],[452,12],[453,12],[451,256],[449,257],[450,257],[480,258],[436,259],[434,260],[431,261],[432,262],[427,261],[429,261],[437,12],[481,263],[482,257],[483,258],[392,263],[442,264],[444,12],[443,12],[439,12],[446,265],[440,12],[484,261],[485,1],[379,12],[380,12],[435,12],[486,12],[466,266],[438,267],[428,268],[393,257],[430,269],[488,270],[447,271],[448,256],[467,1],[465,272],[441,1],[487,273],[445,1],[433,274],[489,275],[426,276],[479,1],[425,1]],"exportedModulesMap":[[195,1],[381,1],[384,2],[383,3],[382,4],[400,5],[396,6],[403,7],[398,8],[399,1],[401,5],[397,8],[394,1],[402,8],[395,1],[416,9],[423,10],[413,11],[422,12],[420,11],[414,9],[415,13],[406,11],[404,14],[421,15],[417,14],[419,11],[418,14],[412,14],[411,11],[405,11],[407,16],[409,11],[410,11],[408,11],[76,1],[73,1],[72,1],[67,17],[78,18],[63,19],[74,20],[66,21],[65,22],[75,1],[70,23],[77,1],[71,24],[64,1],[478,25],[477,26],[476,19],[80,27],[62,1],[490,1],[492,28],[493,28],[494,28],[491,1],[497,29],[495,30],[496,30],[475,31],[498,1],[499,1],[501,32],[500,1],[92,33],[93,33],[94,34],[95,35],[96,36],[97,37],[88,38],[86,1],[87,1],[98,39],[99,40],[100,41],[101,42],[102,43],[103,44],[104,44],[105,45],[106,46],[107,47],[108,48],[109,49],[91,1],[110,50],[111,51],[112,52],[113,53],[114,54],[115,55],[116,56],[117,57],[118,58],[119,59],[120,60],[121,61],[122,62],[123,63],[124,64],[126,65],[125,66],[127,67],[128,68],[129,1],[130,69],[131,70],[132,71],[133,72],[90,73],[89,1],[142,74],[134,75],[135,76],[136,77],[137,78],[138,79],[139,80],[140,81],[141,82],[508,83],[507,84],[59,1],[146,85],[61,12],[147,86],[145,12],[281,87],[79,88],[510,89],[509,90],[143,91],[144,92],[57,1],[60,93],[279,12],[254,12],[535,94],[536,95],[511,96],[514,96],[533,94],[534,94],[524,94],[523,97],[521,94],[516,94],[529,94],[527,94],[531,94],[515,94],[528,94],[532,94],[517,94],[518,94],[530,94],[512,94],[519,94],[520,94],[522,94],[526,94],[537,98],[525,94],[513,94],[550,99],[549,1],[544,98],[546,100],[545,98],[538,98],[539,98],[541,98],[543,98],[547,100],[548,100],[540,100],[542,100],[377,1],[378,1],[424,1],[468,1],[58,1],[469,1],[471,101],[473,102],[472,101],[470,20],[474,103],[163,104],[199,105],[339,106],[194,107],[182,1],[178,1],[161,1],[328,108],[352,109],[162,1],[329,110],[203,111],[204,112],[278,113],[325,114],[295,115],[333,116],[334,117],[332,118],[331,1],[330,119],[201,120],[164,121],[226,1],[227,122],[181,1],[183,123],[165,124],[216,123],[299,123],[84,123],[197,125],[196,1],[338,126],[367,1],[177,1],[255,127],[256,128],[249,12],[258,1],[259,13],[250,129],[271,12],[324,130],[323,1],[251,12],[291,131],[289,132],[290,133],[372,134],[371,135],[375,136],[374,137],[229,1],[81,1],[335,138],[336,139],[337,140],[185,1],[176,141],[148,1],[82,142],[270,143],[269,144],[260,1],[261,1],[268,1],[263,1],[266,145],[262,1],[264,146],[267,147],[265,146],[160,1],[174,1],[175,1],[206,1],[276,13],[297,13],[342,148],[341,1],[284,1],[150,149],[252,150],[253,151],[244,152],[234,1],[275,153],[235,154],[277,155],[273,156],[272,1],[274,1],[288,157],[343,158],[344,159],[236,160],[241,161],[232,162],[320,163],[149,164],[215,165],[310,166],[173,167],[368,168],[369,107],[207,1],[208,169],[362,170],[205,1],[361,171],[85,1],[359,172],[184,1],[228,173],[355,1],[166,1],[167,1],[211,174],[180,1],[348,175],[240,176],[340,177],[239,1],[210,1],[311,178],[312,179],[179,1],[314,180],[316,181],[315,182],[187,1],[209,167],[318,183],[360,184],[363,185],[151,1],[154,1],[152,1],[156,1],[153,1],[155,1],[157,186],[159,1],[303,187],[302,1],[308,188],[304,189],[307,190],[306,190],[309,188],[305,189],[172,191],[298,192],[347,193],[238,1],[345,158],[257,158],[158,1],[237,194],[169,195],[170,196],[171,197],[225,198],[319,198],[217,198],[300,199],[218,199],[202,200],[168,1],[214,201],[213,202],[212,203],[301,204],[346,205],[248,206],[283,207],[247,208],[280,209],[282,210],[327,211],[326,212],[322,213],[294,214],[296,215],[293,216],[317,217],[287,1],[286,218],[321,1],[349,219],[233,138],[231,220],[230,221],[285,222],[350,223],[351,223],[353,224],[246,12],[292,225],[200,1],[189,226],[242,1],[224,12],[223,227],[365,228],[222,229],[83,1],[220,12],[221,12],[370,1],[188,1],[219,230],[373,231],[186,232],[243,61],[354,61],[313,1],[357,233],[356,1],[245,12],[366,234],[198,235],[193,236],[192,1],[191,237],[190,1],[364,238],[376,239],[506,240],[503,241],[505,242],[504,1],[502,1],[69,243],[68,1],[390,244],[391,245],[389,246],[386,247],[385,248],[388,249],[387,247],[358,250],[11,1],[12,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[4,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[5,1],[30,1],[31,1],[32,1],[33,1],[6,1],[37,1],[34,1],[35,1],[36,1],[38,1],[7,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[8,1],[49,1],[46,1],[47,1],[48,1],[50,1],[9,1],[51,1],[52,1],[53,1],[54,1],[55,1],[1,1],[10,1],[56,1],[459,251],[460,251],[461,251],[462,251],[463,251],[464,252],[458,1],[457,253],[456,277],[455,255],[454,256],[452,12],[453,12],[451,256],[449,277],[450,257],[480,277],[436,259],[434,260],[431,261],[432,262],[427,261],[429,261],[437,12],[481,263],[482,257],[483,258],[392,263],[442,264],[444,12],[443,12],[439,12],[446,265],[440,12],[484,261],[485,1],[379,12],[380,12],[435,12],[486,12],[466,266],[438,267],[428,268],[393,257],[430,269],[488,270],[447,271],[448,256],[467,1],[465,272],[441,1],[487,273],[445,1],[433,274],[489,275],[426,276],[479,1],[425,1]],"semanticDiagnosticsPerFile":[195,381,384,383,382,400,396,403,398,399,401,397,394,402,395,416,423,413,422,420,414,415,406,404,421,417,419,418,412,411,405,407,409,410,408,76,73,72,67,78,63,74,66,65,75,70,77,71,64,478,477,476,80,62,490,492,493,494,491,497,495,496,475,498,499,501,500,92,93,94,95,96,97,88,86,87,98,99,100,101,102,103,104,105,106,107,108,109,91,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,126,125,127,128,129,130,131,132,133,90,89,142,134,135,136,137,138,139,140,141,508,507,59,146,61,147,145,281,79,510,509,143,144,57,60,279,254,535,536,511,514,533,534,524,523,521,516,529,527,531,515,528,532,517,518,530,512,519,520,522,526,537,525,513,550,549,544,546,545,538,539,541,543,547,548,540,542,377,378,424,468,58,469,471,473,472,470,474,163,199,339,194,182,178,161,328,352,162,329,203,204,278,325,295,333,334,332,331,330,201,164,226,227,181,183,165,216,299,84,197,196,338,367,177,255,256,249,258,259,250,271,324,323,251,291,289,290,372,371,375,374,229,81,335,336,337,185,176,148,82,270,269,260,261,268,263,266,262,264,267,265,160,174,175,206,276,297,342,341,284,150,252,253,244,234,275,235,277,273,272,274,288,343,344,236,241,232,320,149,215,310,173,368,369,207,208,362,205,361,85,359,184,228,355,166,167,211,180,348,240,340,239,210,311,312,179,314,316,315,187,209,318,360,363,151,154,152,156,153,155,157,159,303,302,308,304,307,306,309,305,172,298,347,238,345,257,158,237,169,170,171,225,319,217,300,218,202,168,214,213,212,301,346,248,283,247,280,282,327,326,322,294,296,293,317,287,286,321,349,233,231,230,285,350,351,353,246,292,200,189,242,224,223,365,222,83,220,221,370,188,219,373,186,243,354,313,357,356,245,366,198,193,192,191,190,364,376,506,503,505,504,502,69,68,390,391,389,386,385,388,387,358,11,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,54,55,1,10,56,459,460,461,462,463,464,458,457,456,455,454,452,453,451,449,450,480,436,434,431,432,427,429,437,481,482,483,392,442,444,443,439,446,440,484,485,379,380,435,486,466,438,428,393,430,488,447,448,467,465,441,487,445,433,489,426,479,425],"affectedFilesPendingEmit":[[195,1],[381,1],[384,1],[383,1],[382,1],[400,1],[396,1],[403,1],[398,1],[399,1],[401,1],[397,1],[394,1],[402,1],[395,1],[416,1],[423,1],[413,1],[422,1],[420,1],[414,1],[415,1],[406,1],[404,1],[421,1],[417,1],[419,1],[418,1],[412,1],[411,1],[405,1],[407,1],[409,1],[410,1],[408,1],[76,1],[73,1],[72,1],[67,1],[78,1],[63,1],[74,1],[66,1],[65,1],[75,1],[70,1],[77,1],[71,1],[64,1],[478,1],[477,1],[476,1],[80,1],[62,1],[490,1],[492,1],[493,1],[494,1],[491,1],[497,1],[495,1],[496,1],[475,1],[498,1],[499,1],[501,1],[500,1],[92,1],[93,1],[94,1],[95,1],[96,1],[97,1],[88,1],[86,1],[87,1],[98,1],[99,1],[100,1],[101,1],[102,1],[103,1],[104,1],[105,1],[106,1],[107,1],[108,1],[109,1],[91,1],[110,1],[111,1],[112,1],[113,1],[114,1],[115,1],[116,1],[117,1],[118,1],[119,1],[120,1],[121,1],[122,1],[123,1],[124,1],[126,1],[125,1],[127,1],[128,1],[129,1],[130,1],[131,1],[132,1],[133,1],[90,1],[89,1],[142,1],[134,1],[135,1],[136,1],[137,1],[138,1],[139,1],[140,1],[141,1],[508,1],[507,1],[59,1],[146,1],[61,1],[147,1],[145,1],[281,1],[79,1],[510,1],[509,1],[143,1],[144,1],[57,1],[60,1],[279,1],[254,1],[535,1],[536,1],[511,1],[514,1],[533,1],[534,1],[524,1],[523,1],[521,1],[516,1],[529,1],[527,1],[531,1],[515,1],[528,1],[532,1],[517,1],[518,1],[530,1],[512,1],[519,1],[520,1],[522,1],[526,1],[537,1],[525,1],[513,1],[550,1],[549,1],[544,1],[546,1],[545,1],[538,1],[539,1],[541,1],[543,1],[547,1],[548,1],[540,1],[542,1],[377,1],[378,1],[424,1],[468,1],[58,1],[469,1],[471,1],[473,1],[472,1],[470,1],[474,1],[163,1],[199,1],[339,1],[194,1],[182,1],[178,1],[161,1],[328,1],[352,1],[162,1],[329,1],[203,1],[204,1],[278,1],[325,1],[295,1],[333,1],[334,1],[332,1],[331,1],[330,1],[201,1],[164,1],[226,1],[227,1],[181,1],[183,1],[165,1],[216,1],[299,1],[84,1],[197,1],[196,1],[338,1],[367,1],[177,1],[255,1],[256,1],[249,1],[258,1],[259,1],[250,1],[271,1],[324,1],[323,1],[251,1],[291,1],[289,1],[290,1],[372,1],[371,1],[375,1],[374,1],[229,1],[81,1],[335,1],[336,1],[337,1],[185,1],[176,1],[148,1],[82,1],[270,1],[269,1],[260,1],[261,1],[268,1],[263,1],[266,1],[262,1],[264,1],[267,1],[265,1],[160,1],[174,1],[175,1],[206,1],[276,1],[297,1],[342,1],[341,1],[284,1],[150,1],[252,1],[253,1],[244,1],[234,1],[275,1],[235,1],[277,1],[273,1],[272,1],[274,1],[288,1],[343,1],[344,1],[236,1],[241,1],[232,1],[320,1],[149,1],[215,1],[310,1],[173,1],[368,1],[369,1],[207,1],[208,1],[362,1],[205,1],[361,1],[85,1],[359,1],[184,1],[228,1],[355,1],[166,1],[167,1],[211,1],[180,1],[348,1],[240,1],[340,1],[239,1],[210,1],[311,1],[312,1],[179,1],[314,1],[316,1],[315,1],[187,1],[209,1],[318,1],[360,1],[363,1],[151,1],[154,1],[152,1],[156,1],[153,1],[155,1],[157,1],[159,1],[303,1],[302,1],[308,1],[304,1],[307,1],[306,1],[309,1],[305,1],[172,1],[298,1],[347,1],[238,1],[345,1],[257,1],[158,1],[237,1],[169,1],[170,1],[171,1],[225,1],[319,1],[217,1],[300,1],[218,1],[202,1],[168,1],[214,1],[213,1],[212,1],[301,1],[346,1],[248,1],[283,1],[247,1],[280,1],[282,1],[327,1],[326,1],[322,1],[294,1],[296,1],[293,1],[317,1],[287,1],[286,1],[321,1],[349,1],[233,1],[231,1],[230,1],[285,1],[350,1],[351,1],[353,1],[246,1],[292,1],[200,1],[189,1],[242,1],[224,1],[223,1],[365,1],[222,1],[83,1],[220,1],[221,1],[370,1],[188,1],[219,1],[373,1],[186,1],[243,1],[354,1],[313,1],[357,1],[356,1],[245,1],[366,1],[198,1],[193,1],[192,1],[191,1],[190,1],[364,1],[376,1],[506,1],[503,1],[505,1],[504,1],[502,1],[69,1],[68,1],[390,1],[391,1],[389,1],[386,1],[385,1],[388,1],[387,1],[358,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1],[459,1],[460,1],[461,1],[462,1],[463,1],[464,1],[458,1],[457,1],[456,1],[455,1],[454,1],[452,1],[453,1],[451,1],[449,1],[450,1],[480,1],[436,1],[434,1],[431,1],[432,1],[427,1],[429,1],[437,1],[481,1],[482,1],[483,1],[392,1],[442,1],[444,1],[443,1],[439,1],[446,1],[440,1],[484,1],[485,1],[379,1],[380,1],[435,1],[486,1],[466,1],[438,1],[428,1],[393,1],[430,1],[488,1],[447,1],[448,1],[467,1],[465,1],[441,1],[487,1],[445,1],[433,1],[489,1],[426,1],[479,1],[425,1]]},"version":"4.9.5"} \ No newline at end of file diff --git a/.next/cache/eslint/.cache_1s48lv4 b/.next/cache/eslint/.cache_1s48lv4 new file mode 100644 index 0000000..b358106 --- /dev/null +++ b/.next/cache/eslint/.cache_1s48lv4 @@ -0,0 +1 @@ +[{"/Users/rstillw/Documents/tcg-vault/pages/_app.tsx":"1","/Users/rstillw/Documents/tcg-vault/pages/index.tsx":"2","/Users/rstillw/Documents/tcg-vault/src/App.test.tsx":"3","/Users/rstillw/Documents/tcg-vault/src/App.tsx":"4","/Users/rstillw/Documents/tcg-vault/src/components/CameraScanner.tsx":"5","/Users/rstillw/Documents/tcg-vault/src/components/CardImageDisplay.tsx":"6","/Users/rstillw/Documents/tcg-vault/src/components/GlowingCard.tsx":"7","/Users/rstillw/Documents/tcg-vault/src/components/MobileNavbar.tsx":"8","/Users/rstillw/Documents/tcg-vault/src/components/Navbar.tsx":"9","/Users/rstillw/Documents/tcg-vault/src/components/OCRSettings.tsx":"10","/Users/rstillw/Documents/tcg-vault/src/components/ResponsiveLayout.tsx":"11","/Users/rstillw/Documents/tcg-vault/src/components/admin/AdminPanel.tsx":"12","/Users/rstillw/Documents/tcg-vault/src/components/admin/CardLoader.tsx":"13","/Users/rstillw/Documents/tcg-vault/src/components/admin/CardManagement.tsx":"14","/Users/rstillw/Documents/tcg-vault/src/components/admin/SystemStats.tsx":"15","/Users/rstillw/Documents/tcg-vault/src/components/admin/UserManagement.tsx":"16","/Users/rstillw/Documents/tcg-vault/src/components/auth/LoginForm.tsx":"17","/Users/rstillw/Documents/tcg-vault/src/components/auth/RegisterForm.tsx":"18","/Users/rstillw/Documents/tcg-vault/src/components/cards/CardDatabaseBrowser.tsx":"19","/Users/rstillw/Documents/tcg-vault/src/components/cards/CardManager.tsx":"20","/Users/rstillw/Documents/tcg-vault/src/components/cards/CardSearch.tsx":"21","/Users/rstillw/Documents/tcg-vault/src/components/collections/CollectionManager.tsx":"22","/Users/rstillw/Documents/tcg-vault/src/components/decks/DeckManager.tsx":"23","/Users/rstillw/Documents/tcg-vault/src/components/scanner/AutoScanningCamera.tsx":"24","/Users/rstillw/Documents/tcg-vault/src/components/scanner/BulkOperations.tsx":"25","/Users/rstillw/Documents/tcg-vault/src/components/scanner/CardQueue.tsx":"26","/Users/rstillw/Documents/tcg-vault/src/components/scanner/ScanModeSelector.tsx":"27","/Users/rstillw/Documents/tcg-vault/src/components/scanner/ScannerWizard.tsx":"28","/Users/rstillw/Documents/tcg-vault/src/components/scanner/ScanningToast.tsx":"29","/Users/rstillw/Documents/tcg-vault/src/components/tags/TagManager.tsx":"30","/Users/rstillw/Documents/tcg-vault/src/config/api.ts":"31","/Users/rstillw/Documents/tcg-vault/src/contexts/AuthContext.tsx":"32","/Users/rstillw/Documents/tcg-vault/src/contexts/ThemeContext.tsx":"33","/Users/rstillw/Documents/tcg-vault/src/hooks/use3DTilt.ts":"34","/Users/rstillw/Documents/tcg-vault/src/hooks/useMouseGlow.ts":"35","/Users/rstillw/Documents/tcg-vault/src/index.tsx":"36","/Users/rstillw/Documents/tcg-vault/src/pages/Cards.tsx":"37","/Users/rstillw/Documents/tcg-vault/src/pages/Collections.tsx":"38","/Users/rstillw/Documents/tcg-vault/src/pages/Dashboard.tsx":"39","/Users/rstillw/Documents/tcg-vault/src/pages/Decks.tsx":"40","/Users/rstillw/Documents/tcg-vault/src/pages/Login.tsx":"41","/Users/rstillw/Documents/tcg-vault/src/pages/Scanner.tsx":"42","/Users/rstillw/Documents/tcg-vault/src/pages/Settings.tsx":"43","/Users/rstillw/Documents/tcg-vault/src/react-app-env.d.ts":"44","/Users/rstillw/Documents/tcg-vault/src/reportWebVitals.ts":"45","/Users/rstillw/Documents/tcg-vault/src/services/aiOcr.ts":"46","/Users/rstillw/Documents/tcg-vault/src/services/api.ts":"47","/Users/rstillw/Documents/tcg-vault/src/services/autoTagger.ts":"48","/Users/rstillw/Documents/tcg-vault/src/services/cardDataSources.ts":"49","/Users/rstillw/Documents/tcg-vault/src/services/cardMatcher.ts":"50","/Users/rstillw/Documents/tcg-vault/src/services/tcgApi.ts":"51","/Users/rstillw/Documents/tcg-vault/src/setupTests.ts":"52","/Users/rstillw/Documents/tcg-vault/src/types/index.ts":"53"},{"size":610,"mtime":1753277015246,"results":"54","hashOfConfig":"55"},{"size":190,"mtime":1753277106325,"results":"56","hashOfConfig":"55"},{"size":273,"mtime":1753149977352,"results":"57","hashOfConfig":"55"},{"size":6922,"mtime":1753277119220,"results":"58","hashOfConfig":"55"},{"size":10617,"mtime":1753277143349,"results":"59","hashOfConfig":"55"},{"size":5767,"mtime":1753231476535,"results":"60","hashOfConfig":"55"},{"size":1059,"mtime":1753149977409,"results":"61","hashOfConfig":"55"},{"size":15161,"mtime":1753229272017,"results":"62","hashOfConfig":"55"},{"size":8715,"mtime":1753199587092,"results":"63","hashOfConfig":"55"},{"size":8072,"mtime":1753198112713,"results":"64","hashOfConfig":"55"},{"size":29164,"mtime":1753233788840,"results":"65","hashOfConfig":"55"},{"size":4906,"mtime":1753271427197,"results":"66","hashOfConfig":"55"},{"size":6720,"mtime":1753271772383,"results":"67","hashOfConfig":"55"},{"size":1999,"mtime":1753149977384,"results":"68","hashOfConfig":"55"},{"size":10203,"mtime":1753149977396,"results":"69","hashOfConfig":"55"},{"size":11681,"mtime":1753149977377,"results":"70","hashOfConfig":"55"},{"size":7528,"mtime":1753277131359,"results":"71","hashOfConfig":"55"},{"size":12420,"mtime":1753228124175,"results":"72","hashOfConfig":"55"},{"size":29418,"mtime":1753235914310,"results":"73","hashOfConfig":"55"},{"size":16513,"mtime":1753231860218,"results":"74","hashOfConfig":"55"},{"size":13548,"mtime":1753231823603,"results":"75","hashOfConfig":"55"},{"size":15879,"mtime":1753231827808,"results":"76","hashOfConfig":"55"},{"size":17667,"mtime":1753231885365,"results":"77","hashOfConfig":"55"},{"size":17077,"mtime":1753205687212,"results":"78","hashOfConfig":"55"},{"size":10746,"mtime":1753205778006,"results":"79","hashOfConfig":"55"},{"size":8692,"mtime":1753205738954,"results":"80","hashOfConfig":"55"},{"size":5140,"mtime":1753205639155,"results":"81","hashOfConfig":"55"},{"size":16449,"mtime":1753205826012,"results":"82","hashOfConfig":"55"},{"size":2593,"mtime":1753205655039,"results":"83","hashOfConfig":"55"},{"size":9221,"mtime":1753231514346,"results":"84","hashOfConfig":"55"},{"size":698,"mtime":1753122589646,"results":"85","hashOfConfig":"55"},{"size":4362,"mtime":1753149977346,"results":"86","hashOfConfig":"55"},{"size":2780,"mtime":1753227913895,"results":"87","hashOfConfig":"55"},{"size":3082,"mtime":1753114583783,"results":"88","hashOfConfig":"55"},{"size":3619,"mtime":1753115265319,"results":"89","hashOfConfig":"55"},{"size":934,"mtime":1753227885431,"results":"90","hashOfConfig":"55"},{"size":25009,"mtime":1753232339499,"results":"91","hashOfConfig":"55"},{"size":16346,"mtime":1753230935381,"results":"92","hashOfConfig":"55"},{"size":7815,"mtime":1753228054699,"results":"93","hashOfConfig":"55"},{"size":18864,"mtime":1753231660389,"results":"94","hashOfConfig":"55"},{"size":7218,"mtime":1753149977413,"results":"95","hashOfConfig":"55"},{"size":183,"mtime":1753204256143,"results":"96","hashOfConfig":"55"},{"size":19334,"mtime":1753199980301,"results":"97","hashOfConfig":"55"},{"size":40,"mtime":1753065402375,"results":"98","hashOfConfig":"55"},{"size":425,"mtime":1753065399131,"results":"99","hashOfConfig":"55"},{"size":10572,"mtime":1753199803577,"results":"100","hashOfConfig":"55"},{"size":2821,"mtime":1753119039959,"results":"101","hashOfConfig":"55"},{"size":8876,"mtime":1753204194576,"results":"102","hashOfConfig":"55"},{"size":36265,"mtime":1753271744472,"results":"103","hashOfConfig":"55"},{"size":6776,"mtime":1753115903294,"results":"104","hashOfConfig":"55"},{"size":12922,"mtime":1753238836531,"results":"105","hashOfConfig":"55"},{"size":241,"mtime":1753065399132,"results":"106","hashOfConfig":"55"},{"size":5584,"mtime":1753231762033,"results":"107","hashOfConfig":"55"},{"filePath":"108","messages":"109","suppressedMessages":"110","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"cbz3cf",{"filePath":"111","messages":"112","suppressedMessages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"114","messages":"115","suppressedMessages":"116","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"117","messages":"118","suppressedMessages":"119","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","suppressedMessages":"122","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"123","messages":"124","suppressedMessages":"125","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"126","messages":"127","suppressedMessages":"128","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"129","messages":"130","suppressedMessages":"131","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","suppressedMessages":"134","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"135","messages":"136","suppressedMessages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","suppressedMessages":"140","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"141","messages":"142","suppressedMessages":"143","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","suppressedMessages":"146","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"147","messages":"148","suppressedMessages":"149","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","suppressedMessages":"152","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"153","messages":"154","suppressedMessages":"155","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"156","messages":"157","suppressedMessages":"158","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","suppressedMessages":"161","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","suppressedMessages":"164","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"165","messages":"166","suppressedMessages":"167","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"168","messages":"169","suppressedMessages":"170","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"171","messages":"172","suppressedMessages":"173","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","suppressedMessages":"176","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","suppressedMessages":"179","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"180","messages":"181","suppressedMessages":"182","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"183","messages":"184","suppressedMessages":"185","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"186","messages":"187","suppressedMessages":"188","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"189","messages":"190","suppressedMessages":"191","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","suppressedMessages":"194","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"195","messages":"196","suppressedMessages":"197","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","suppressedMessages":"200","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"201","messages":"202","suppressedMessages":"203","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","suppressedMessages":"206","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"207","messages":"208","suppressedMessages":"209","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"210","messages":"211","suppressedMessages":"212","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"213","messages":"214","suppressedMessages":"215","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"216","messages":"217","suppressedMessages":"218","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"219","messages":"220","suppressedMessages":"221","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"222","messages":"223","suppressedMessages":"224","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"225","messages":"226","suppressedMessages":"227","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"228","messages":"229","suppressedMessages":"230","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"231","messages":"232","suppressedMessages":"233","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"234","messages":"235","suppressedMessages":"236","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"237","messages":"238","suppressedMessages":"239","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"240","messages":"241","suppressedMessages":"242","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"243","messages":"244","suppressedMessages":"245","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"246","messages":"247","suppressedMessages":"248","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"249","messages":"250","suppressedMessages":"251","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"252","messages":"253","suppressedMessages":"254","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"255","messages":"256","suppressedMessages":"257","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"258","messages":"259","suppressedMessages":"260","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"261","messages":"262","suppressedMessages":"263","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"264","messages":"265","suppressedMessages":"266","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/rstillw/Documents/tcg-vault/pages/_app.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/pages/index.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/App.test.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/App.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/CameraScanner.tsx",["267"],[],"/Users/rstillw/Documents/tcg-vault/src/components/CardImageDisplay.tsx",["268"],[],"/Users/rstillw/Documents/tcg-vault/src/components/GlowingCard.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/MobileNavbar.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/Navbar.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/OCRSettings.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/ResponsiveLayout.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/admin/AdminPanel.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/admin/CardLoader.tsx",["269"],[],"/Users/rstillw/Documents/tcg-vault/src/components/admin/CardManagement.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/admin/SystemStats.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/admin/UserManagement.tsx",["270"],[],"/Users/rstillw/Documents/tcg-vault/src/components/auth/LoginForm.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/auth/RegisterForm.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/cards/CardDatabaseBrowser.tsx",["271","272"],[],"/Users/rstillw/Documents/tcg-vault/src/components/cards/CardManager.tsx",["273"],[],"/Users/rstillw/Documents/tcg-vault/src/components/cards/CardSearch.tsx",["274"],[],"/Users/rstillw/Documents/tcg-vault/src/components/collections/CollectionManager.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/decks/DeckManager.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/scanner/AutoScanningCamera.tsx",["275","276"],[],"/Users/rstillw/Documents/tcg-vault/src/components/scanner/BulkOperations.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/scanner/CardQueue.tsx",["277"],[],"/Users/rstillw/Documents/tcg-vault/src/components/scanner/ScanModeSelector.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/scanner/ScannerWizard.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/scanner/ScanningToast.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/components/tags/TagManager.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/config/api.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/contexts/AuthContext.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/contexts/ThemeContext.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/hooks/use3DTilt.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/hooks/useMouseGlow.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/index.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/pages/Cards.tsx",["278"],[],"/Users/rstillw/Documents/tcg-vault/src/pages/Collections.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/pages/Dashboard.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/pages/Decks.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/pages/Login.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/pages/Scanner.tsx",[],[],"/Users/rstillw/Documents/tcg-vault/src/pages/Settings.tsx",[],["279"],"/Users/rstillw/Documents/tcg-vault/src/react-app-env.d.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/reportWebVitals.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/services/aiOcr.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/services/api.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/services/autoTagger.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/services/cardDataSources.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/services/cardMatcher.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/services/tcgApi.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/setupTests.ts",[],[],"/Users/rstillw/Documents/tcg-vault/src/types/index.ts",[],[],{"ruleId":"280","severity":1,"message":"281","line":250,"column":11,"nodeType":"282","endLine":254,"endColumn":13},{"ruleId":"280","severity":1,"message":"281","line":111,"column":9,"nodeType":"282","endLine":116,"endColumn":11},{"ruleId":"283","severity":1,"message":"284","line":45,"column":6,"nodeType":"285","endLine":45,"endColumn":8,"suggestions":"286"},{"ruleId":"283","severity":1,"message":"287","line":69,"column":6,"nodeType":"285","endLine":69,"endColumn":26,"suggestions":"288"},{"ruleId":"280","severity":1,"message":"281","line":383,"column":33,"nodeType":"282","endLine":387,"endColumn":35},{"ruleId":"280","severity":1,"message":"281","line":488,"column":41,"nodeType":"282","endLine":492,"endColumn":43},{"ruleId":"280","severity":1,"message":"281","line":146,"column":23,"nodeType":"282","endLine":150,"endColumn":25},{"ruleId":"280","severity":1,"message":"281","line":190,"column":27,"nodeType":"282","endLine":194,"endColumn":29},{"ruleId":"283","severity":1,"message":"289","line":113,"column":6,"nodeType":"285","endLine":113,"endColumn":16,"suggestions":"290"},{"ruleId":"283","severity":1,"message":"291","line":172,"column":6,"nodeType":"285","endLine":172,"endColumn":96,"suggestions":"292"},{"ruleId":"280","severity":1,"message":"281","line":144,"column":15,"nodeType":"282","endLine":148,"endColumn":17},{"ruleId":"280","severity":1,"message":"281","line":382,"column":27,"nodeType":"282","endLine":386,"endColumn":29},{"ruleId":"283","severity":1,"message":"293","line":36,"column":6,"nodeType":"285","endLine":36,"endColumn":12,"suggestions":"294","suppressions":"295"},"@next/next/no-img-element","Using `` could result in slower LCP and higher bandwidth. Consider using `` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element","JSXOpeningElement","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'fetchCardCounts'. Either include it or remove the dependency array.","ArrayExpression",["296"],"React Hook useEffect has missing dependencies: 'fetchUsers' and 'searchTerm'. Either include them or remove the dependency array.",["297"],"React Hook useEffect has a missing dependency: 'startCamera'. Either include it or remove the dependency array.",["298"],"React Hook useEffect has a missing dependency: 'triggerScan'. Either include it or remove the dependency array.",["299"],"React Hook useEffect has a missing dependency: 'loadPreferences'. Either include it or remove the dependency array.",["300"],["301"],{"desc":"302","fix":"303"},{"desc":"304","fix":"305"},{"desc":"306","fix":"307"},{"desc":"308","fix":"309"},{"desc":"310","fix":"311"},{"kind":"312","justification":"313"},"Update the dependencies array to be: [fetchCardCounts]",{"range":"314","text":"315"},"Update the dependencies array to be: [currentPage, fetchUsers, searchTerm, token]",{"range":"316","text":"317"},"Update the dependencies array to be: [isActive, startCamera]",{"range":"318","text":"319"},"Update the dependencies array to be: [isStreaming, isActive, scanState.isProcessing, queueCount, maxQueueSize, isOcrConfigured, triggerScan]",{"range":"320","text":"321"},"Update the dependencies array to be: [loadPreferences, user]",{"range":"322","text":"323"},"directive","",[1208,1210],"[fetchCardCounts]",[1774,1794],"[currentPage, fetchUsers, searchTerm, token]",[3367,3377],"[isActive, startCamera]",[5043,5133],"[isStreaming, isActive, scanState.isProcessing, queueCount, maxQueueSize, isOcrConfigured, triggerScan]",[1201,1207],"[loadPreferences, user]"] \ No newline at end of file diff --git a/.next/cache/webpack/client-production/0.pack b/.next/cache/webpack/client-production/0.pack new file mode 100644 index 0000000..0b381f6 Binary files /dev/null and b/.next/cache/webpack/client-production/0.pack differ diff --git a/.next/cache/webpack/client-production/1.pack b/.next/cache/webpack/client-production/1.pack new file mode 100644 index 0000000..9f4aef9 Binary files /dev/null and b/.next/cache/webpack/client-production/1.pack differ diff --git a/.next/cache/webpack/client-production/2.pack b/.next/cache/webpack/client-production/2.pack new file mode 100644 index 0000000..8be6d27 Binary files /dev/null and b/.next/cache/webpack/client-production/2.pack differ diff --git a/.next/cache/webpack/client-production/index.pack b/.next/cache/webpack/client-production/index.pack new file mode 100644 index 0000000..e4da9b1 Binary files /dev/null and b/.next/cache/webpack/client-production/index.pack differ diff --git a/.next/cache/webpack/client-production/index.pack.old b/.next/cache/webpack/client-production/index.pack.old new file mode 100644 index 0000000..8dc3767 Binary files /dev/null and b/.next/cache/webpack/client-production/index.pack.old differ diff --git a/.next/cache/webpack/edge-server-production/0.pack b/.next/cache/webpack/edge-server-production/0.pack new file mode 100644 index 0000000..f22dcaf Binary files /dev/null and b/.next/cache/webpack/edge-server-production/0.pack differ diff --git a/.next/cache/webpack/edge-server-production/index.pack b/.next/cache/webpack/edge-server-production/index.pack new file mode 100644 index 0000000..dab790c Binary files /dev/null and b/.next/cache/webpack/edge-server-production/index.pack differ diff --git a/.next/cache/webpack/server-production/0.pack b/.next/cache/webpack/server-production/0.pack new file mode 100644 index 0000000..c63b37c Binary files /dev/null and b/.next/cache/webpack/server-production/0.pack differ diff --git a/.next/cache/webpack/server-production/1.pack b/.next/cache/webpack/server-production/1.pack new file mode 100644 index 0000000..f2d9ff6 Binary files /dev/null and b/.next/cache/webpack/server-production/1.pack differ diff --git a/.next/cache/webpack/server-production/2.pack b/.next/cache/webpack/server-production/2.pack new file mode 100644 index 0000000..d55d4a0 Binary files /dev/null and b/.next/cache/webpack/server-production/2.pack differ diff --git a/.next/cache/webpack/server-production/index.pack b/.next/cache/webpack/server-production/index.pack new file mode 100644 index 0000000..16eefa8 Binary files /dev/null and b/.next/cache/webpack/server-production/index.pack differ diff --git a/.next/cache/webpack/server-production/index.pack.old b/.next/cache/webpack/server-production/index.pack.old new file mode 100644 index 0000000..267c735 Binary files /dev/null and b/.next/cache/webpack/server-production/index.pack.old differ diff --git a/.next/diagnostics/build-diagnostics.json b/.next/diagnostics/build-diagnostics.json new file mode 100644 index 0000000..21b238f --- /dev/null +++ b/.next/diagnostics/build-diagnostics.json @@ -0,0 +1,6 @@ +{ + "buildStage": "static-generation", + "buildOptions": { + "useBuildWorker": "true" + } +} \ No newline at end of file diff --git a/.next/diagnostics/framework.json b/.next/diagnostics/framework.json new file mode 100644 index 0000000..bb7a286 --- /dev/null +++ b/.next/diagnostics/framework.json @@ -0,0 +1 @@ +{"name":"Next.js","version":"15.4.2"} \ No newline at end of file diff --git a/.next/dynamic-css-manifest.json b/.next/dynamic-css-manifest.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/.next/dynamic-css-manifest.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/.next/export-marker.json b/.next/export-marker.json new file mode 100644 index 0000000..e4c41c9 --- /dev/null +++ b/.next/export-marker.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "hasExportPathMap": false, + "exportTrailingSlash": false, + "isNextImageImported": false +} \ No newline at end of file diff --git a/.next/images-manifest.json b/.next/images-manifest.json new file mode 100644 index 0000000..e94c6a6 --- /dev/null +++ b/.next/images-manifest.json @@ -0,0 +1,61 @@ +{ + "version": 1, + "images": { + "deviceSizes": [ + 640, + 750, + 828, + 1080, + 1200, + 1920, + 2048, + 3840 + ], + "imageSizes": [ + 16, + 32, + 48, + 64, + 96, + 128, + 256, + 384 + ], + "path": "/_next/image", + "loader": "default", + "loaderFile": "", + "domains": [ + "api.scryfall.com", + "images.pokemontcg.io", + "lorcana-api.com" + ], + "disableStaticImages": false, + "minimumCacheTTL": 60, + "formats": [ + "image/webp" + ], + "dangerouslyAllowSVG": false, + "contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;", + "contentDispositionType": "attachment", + "remotePatterns": [], + "unoptimized": false, + "sizes": [ + 640, + 750, + 828, + 1080, + 1200, + 1920, + 2048, + 3840, + 16, + 32, + 48, + 64, + 96, + 128, + 256, + 384 + ] + } +} \ No newline at end of file diff --git a/.next/next-minimal-server.js.nft.json b/.next/next-minimal-server.js.nft.json new file mode 100644 index 0000000..f2d66ea --- /dev/null +++ b/.next/next-minimal-server.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../node_modules/@swc/helpers/_/_interop_require_default/package.json","../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../node_modules/@swc/helpers/package.json","../node_modules/caniuse-lite/data/agents.js","../node_modules/caniuse-lite/data/browserVersions.js","../node_modules/caniuse-lite/data/browsers.js","../node_modules/caniuse-lite/dist/lib/statuses.js","../node_modules/caniuse-lite/dist/lib/supported.js","../node_modules/caniuse-lite/dist/unpacker/agents.js","../node_modules/caniuse-lite/dist/unpacker/browserVersions.js","../node_modules/caniuse-lite/dist/unpacker/browsers.js","../node_modules/caniuse-lite/dist/unpacker/feature.js","../node_modules/caniuse-lite/dist/unpacker/region.js","../node_modules/caniuse-lite/package.json","../node_modules/client-only/index.js","../node_modules/client-only/package.json","../node_modules/next/dist/client/components/app-router-headers.js","../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../node_modules/next/dist/compiled/babel-packages/package.json","../node_modules/next/dist/compiled/babel-packages/packages-bundle.js","../node_modules/next/dist/compiled/babel/bundle.js","../node_modules/next/dist/compiled/babel/code-frame.js","../node_modules/next/dist/compiled/babel/core.js","../node_modules/next/dist/compiled/babel/package.json","../node_modules/next/dist/compiled/babel/parser.js","../node_modules/next/dist/compiled/babel/traverse.js","../node_modules/next/dist/compiled/babel/types.js","../node_modules/next/dist/compiled/browserslist/index.js","../node_modules/next/dist/compiled/browserslist/package.json","../node_modules/next/dist/compiled/debug/index.js","../node_modules/next/dist/compiled/debug/package.json","../node_modules/next/dist/compiled/json5/index.js","../node_modules/next/dist/compiled/json5/package.json","../node_modules/next/dist/compiled/jsonwebtoken/index.js","../node_modules/next/dist/compiled/jsonwebtoken/package.json","../node_modules/next/dist/compiled/lru-cache/index.js","../node_modules/next/dist/compiled/lru-cache/package.json","../node_modules/next/dist/compiled/next-server/server.runtime.prod.js","../node_modules/next/dist/compiled/semver/index.js","../node_modules/next/dist/compiled/semver/package.json","../node_modules/next/dist/compiled/source-map/package.json","../node_modules/next/dist/compiled/source-map/source-map.js","../node_modules/next/dist/compiled/stacktrace-parser/package.json","../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../node_modules/next/dist/compiled/ws/index.js","../node_modules/next/dist/compiled/ws/package.json","../node_modules/next/dist/experimental/testmode/context.js","../node_modules/next/dist/experimental/testmode/fetch.js","../node_modules/next/dist/experimental/testmode/server-edge.js","../node_modules/next/dist/lib/constants.js","../node_modules/next/dist/lib/interop-default.js","../node_modules/next/dist/lib/is-error.js","../node_modules/next/dist/lib/picocolors.js","../node_modules/next/dist/lib/semver-noop.js","../node_modules/next/dist/next-devtools/server/shared.js","../node_modules/next/dist/server/after/builtin-request-context.js","../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../node_modules/next/dist/server/app-render/async-local-storage.js","../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../node_modules/next/dist/server/app-render/work-async-storage.external.js","../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../node_modules/next/dist/server/body-streams.js","../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../node_modules/next/dist/server/lib/lru-cache.js","../node_modules/next/dist/server/lib/parse-stack.js","../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../node_modules/next/dist/server/lib/source-maps.js","../node_modules/next/dist/server/lib/trace/constants.js","../node_modules/next/dist/server/lib/trace/tracer.js","../node_modules/next/dist/server/load-manifest.external.js","../node_modules/next/dist/server/patch-error-inspect.js","../node_modules/next/dist/server/response-cache/types.js","../node_modules/next/dist/server/route-modules/app-page/module.compiled.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/pages/module.compiled.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/web/utils.js","../node_modules/next/dist/shared/lib/constants.js","../node_modules/next/dist/shared/lib/deep-freeze.js","../node_modules/next/dist/shared/lib/error-source.js","../node_modules/next/dist/shared/lib/is-internal.js","../node_modules/next/dist/shared/lib/is-plain-object.js","../node_modules/next/dist/shared/lib/is-thenable.js","../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../node_modules/next/dist/shared/lib/runtime-config.external.js","../node_modules/next/package.json","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/package.json","../node_modules/styled-jsx/dist/index/index.js","../node_modules/styled-jsx/index.js","../node_modules/styled-jsx/package.json","../node_modules/styled-jsx/style.js","package.json"]} \ No newline at end of file diff --git a/.next/next-server.js.nft.json b/.next/next-server.js.nft.json new file mode 100644 index 0000000..daa1d50 --- /dev/null +++ b/.next/next-server.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../node_modules/@img/sharp-darwin-arm64/LICENSE","../node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node","../node_modules/@img/sharp-darwin-arm64/package.json","../node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js","../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.1.dylib","../node_modules/@img/sharp-libvips-darwin-arm64/package.json","../node_modules/@img/sharp-libvips-darwin-arm64/versions.json","../node_modules/@next/env/dist/index.js","../node_modules/@next/env/package.json","../node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json","../node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json","../node_modules/@swc/helpers/_/_interop_require_default/package.json","../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs","../node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs","../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../node_modules/@swc/helpers/package.json","../node_modules/caniuse-lite/data/agents.js","../node_modules/caniuse-lite/data/browserVersions.js","../node_modules/caniuse-lite/data/browsers.js","../node_modules/caniuse-lite/dist/lib/statuses.js","../node_modules/caniuse-lite/dist/lib/supported.js","../node_modules/caniuse-lite/dist/unpacker/agents.js","../node_modules/caniuse-lite/dist/unpacker/browserVersions.js","../node_modules/caniuse-lite/dist/unpacker/browsers.js","../node_modules/caniuse-lite/dist/unpacker/feature.js","../node_modules/caniuse-lite/dist/unpacker/region.js","../node_modules/caniuse-lite/package.json","../node_modules/client-only/index.js","../node_modules/client-only/package.json","../node_modules/color-convert/conversions.js","../node_modules/color-convert/index.js","../node_modules/color-convert/package.json","../node_modules/color-convert/route.js","../node_modules/color-name/index.js","../node_modules/color-name/package.json","../node_modules/color-string/index.js","../node_modules/color-string/package.json","../node_modules/color/index.js","../node_modules/color/package.json","../node_modules/detect-libc/lib/detect-libc.js","../node_modules/detect-libc/lib/filesystem.js","../node_modules/detect-libc/lib/process.js","../node_modules/detect-libc/package.json","../node_modules/next/dist/build/output/log.js","../node_modules/next/dist/client/add-base-path.js","../node_modules/next/dist/client/app-build-id.js","../node_modules/next/dist/client/app-call-server.js","../node_modules/next/dist/client/app-find-source-map-url.js","../node_modules/next/dist/client/assign-location.js","../node_modules/next/dist/client/components/app-router-announcer.js","../node_modules/next/dist/client/components/app-router-headers.js","../node_modules/next/dist/client/components/app-router-instance.js","../node_modules/next/dist/client/components/app-router.js","../node_modules/next/dist/client/components/bailout-to-client-rendering.js","../node_modules/next/dist/client/components/builtin/default.js","../node_modules/next/dist/client/components/builtin/global-error.js","../node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js","../node_modules/next/dist/client/components/error-boundary.js","../node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js","../node_modules/next/dist/client/components/forbidden.js","../node_modules/next/dist/client/components/handle-isr-error.js","../node_modules/next/dist/client/components/hooks-server-context.js","../node_modules/next/dist/client/components/http-access-fallback/error-boundary.js","../node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js","../node_modules/next/dist/client/components/is-next-router-error.js","../node_modules/next/dist/client/components/links.js","../node_modules/next/dist/client/components/match-segments.js","../node_modules/next/dist/client/components/nav-failure-handler.js","../node_modules/next/dist/client/components/navigation-untracked.js","../node_modules/next/dist/client/components/navigation.js","../node_modules/next/dist/client/components/navigation.react-server.js","../node_modules/next/dist/client/components/not-found.js","../node_modules/next/dist/client/components/promise-queue.js","../node_modules/next/dist/client/components/redirect-boundary.js","../node_modules/next/dist/client/components/redirect-error.js","../node_modules/next/dist/client/components/redirect-status-code.js","../node_modules/next/dist/client/components/redirect.js","../node_modules/next/dist/client/components/router-reducer/aliased-prefetch-navigations.js","../node_modules/next/dist/client/components/router-reducer/apply-flight-data.js","../node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js","../node_modules/next/dist/client/components/router-reducer/clear-cache-node-data-for-segment-path.js","../node_modules/next/dist/client/components/router-reducer/compute-changed-path.js","../node_modules/next/dist/client/components/router-reducer/create-href-from-url.js","../node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js","../node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js","../node_modules/next/dist/client/components/router-reducer/fetch-server-response.js","../node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js","../node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js","../node_modules/next/dist/client/components/router-reducer/handle-mutable.js","../node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js","../node_modules/next/dist/client/components/router-reducer/invalidate-cache-below-flight-segmentpath.js","../node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js","../node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js","../node_modules/next/dist/client/components/router-reducer/ppr-navigations.js","../node_modules/next/dist/client/components/router-reducer/prefetch-cache-utils.js","../node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js","../node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.js","../node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js","../node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/prefetch-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js","../node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js","../node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js","../node_modules/next/dist/client/components/router-reducer/router-reducer-types.js","../node_modules/next/dist/client/components/router-reducer/router-reducer.js","../node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js","../node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js","../node_modules/next/dist/client/components/segment-cache-impl/cache-key.js","../node_modules/next/dist/client/components/segment-cache-impl/cache.js","../node_modules/next/dist/client/components/segment-cache-impl/lru.js","../node_modules/next/dist/client/components/segment-cache-impl/navigation.js","../node_modules/next/dist/client/components/segment-cache-impl/prefetch.js","../node_modules/next/dist/client/components/segment-cache-impl/scheduler.js","../node_modules/next/dist/client/components/segment-cache-impl/tuple-map.js","../node_modules/next/dist/client/components/segment-cache.js","../node_modules/next/dist/client/components/static-generation-bailout.js","../node_modules/next/dist/client/components/unauthorized.js","../node_modules/next/dist/client/components/unresolved-thenable.js","../node_modules/next/dist/client/components/unstable-rethrow.browser.js","../node_modules/next/dist/client/components/unstable-rethrow.js","../node_modules/next/dist/client/components/unstable-rethrow.server.js","../node_modules/next/dist/client/components/use-action-queue.js","../node_modules/next/dist/client/dev/hot-reloader/app/hot-reloader-app.js","../node_modules/next/dist/client/dev/hot-reloader/app/use-websocket.js","../node_modules/next/dist/client/dev/hot-reloader/get-socket-url.js","../node_modules/next/dist/client/dev/hot-reloader/shared.js","../node_modules/next/dist/client/dev/hot-reloader/turbopack-hot-reloader-common.js","../node_modules/next/dist/client/dev/report-hmr-latency.js","../node_modules/next/dist/client/dev/runtime-error-handler.js","../node_modules/next/dist/client/flight-data-helpers.js","../node_modules/next/dist/client/has-base-path.js","../node_modules/next/dist/client/lib/console.js","../node_modules/next/dist/client/normalize-trailing-slash.js","../node_modules/next/dist/client/remove-base-path.js","../node_modules/next/dist/compiled/@edge-runtime/cookies/index.js","../node_modules/next/dist/compiled/@edge-runtime/cookies/package.json","../node_modules/next/dist/compiled/@hapi/accept/index.js","../node_modules/next/dist/compiled/@hapi/accept/package.json","../node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js","../node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json","../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../node_modules/next/dist/compiled/babel-packages/package.json","../node_modules/next/dist/compiled/babel-packages/packages-bundle.js","../node_modules/next/dist/compiled/babel/bundle.js","../node_modules/next/dist/compiled/babel/code-frame.js","../node_modules/next/dist/compiled/babel/core.js","../node_modules/next/dist/compiled/babel/package.json","../node_modules/next/dist/compiled/babel/parser.js","../node_modules/next/dist/compiled/babel/traverse.js","../node_modules/next/dist/compiled/babel/types.js","../node_modules/next/dist/compiled/browserslist/index.js","../node_modules/next/dist/compiled/browserslist/package.json","../node_modules/next/dist/compiled/busboy/index.js","../node_modules/next/dist/compiled/busboy/package.json","../node_modules/next/dist/compiled/bytes/index.js","../node_modules/next/dist/compiled/bytes/package.json","../node_modules/next/dist/compiled/content-disposition/index.js","../node_modules/next/dist/compiled/content-disposition/package.json","../node_modules/next/dist/compiled/cookie/index.js","../node_modules/next/dist/compiled/cookie/package.json","../node_modules/next/dist/compiled/debug/index.js","../node_modules/next/dist/compiled/debug/package.json","../node_modules/next/dist/compiled/edge-runtime/index.js","../node_modules/next/dist/compiled/edge-runtime/package.json","../node_modules/next/dist/compiled/fresh/index.js","../node_modules/next/dist/compiled/fresh/package.json","../node_modules/next/dist/compiled/image-size/index.js","../node_modules/next/dist/compiled/image-size/package.json","../node_modules/next/dist/compiled/is-animated/index.js","../node_modules/next/dist/compiled/is-animated/package.json","../node_modules/next/dist/compiled/json5/index.js","../node_modules/next/dist/compiled/json5/package.json","../node_modules/next/dist/compiled/jsonwebtoken/index.js","../node_modules/next/dist/compiled/jsonwebtoken/package.json","../node_modules/next/dist/compiled/lru-cache/index.js","../node_modules/next/dist/compiled/lru-cache/package.json","../node_modules/next/dist/compiled/nanoid/index.cjs","../node_modules/next/dist/compiled/nanoid/package.json","../node_modules/next/dist/compiled/next-devtools/index.js","../node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js","../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js","../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../node_modules/next/dist/compiled/p-queue/index.js","../node_modules/next/dist/compiled/p-queue/package.json","../node_modules/next/dist/compiled/path-browserify/index.js","../node_modules/next/dist/compiled/path-browserify/package.json","../node_modules/next/dist/compiled/path-to-regexp/index.js","../node_modules/next/dist/compiled/path-to-regexp/package.json","../node_modules/next/dist/compiled/picomatch/index.js","../node_modules/next/dist/compiled/picomatch/package.json","../node_modules/next/dist/compiled/react-is/cjs/react-is.development.js","../node_modules/next/dist/compiled/react-is/cjs/react-is.production.js","../node_modules/next/dist/compiled/react-is/index.js","../node_modules/next/dist/compiled/react-is/package.json","../node_modules/next/dist/compiled/safe-stable-stringify/index.js","../node_modules/next/dist/compiled/safe-stable-stringify/package.json","../node_modules/next/dist/compiled/semver/index.js","../node_modules/next/dist/compiled/semver/package.json","../node_modules/next/dist/compiled/send/index.js","../node_modules/next/dist/compiled/send/package.json","../node_modules/next/dist/compiled/source-map/package.json","../node_modules/next/dist/compiled/source-map/source-map.js","../node_modules/next/dist/compiled/stacktrace-parser/package.json","../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../node_modules/next/dist/compiled/string-hash/index.js","../node_modules/next/dist/compiled/string-hash/package.json","../node_modules/next/dist/compiled/strip-ansi/index.js","../node_modules/next/dist/compiled/strip-ansi/package.json","../node_modules/next/dist/compiled/superstruct/index.cjs","../node_modules/next/dist/compiled/superstruct/package.json","../node_modules/next/dist/compiled/ws/index.js","../node_modules/next/dist/compiled/ws/package.json","../node_modules/next/dist/experimental/testmode/context.js","../node_modules/next/dist/experimental/testmode/fetch.js","../node_modules/next/dist/experimental/testmode/httpget.js","../node_modules/next/dist/experimental/testmode/server-edge.js","../node_modules/next/dist/experimental/testmode/server.js","../node_modules/next/dist/lib/batcher.js","../node_modules/next/dist/lib/client-and-server-references.js","../node_modules/next/dist/lib/constants.js","../node_modules/next/dist/lib/detached-promise.js","../node_modules/next/dist/lib/error-telemetry-utils.js","../node_modules/next/dist/lib/fallback.js","../node_modules/next/dist/lib/find-pages-dir.js","../node_modules/next/dist/lib/format-dynamic-import-path.js","../node_modules/next/dist/lib/format-server-error.js","../node_modules/next/dist/lib/generate-interception-routes-rewrites.js","../node_modules/next/dist/lib/interop-default.js","../node_modules/next/dist/lib/is-api-route.js","../node_modules/next/dist/lib/is-app-page-route.js","../node_modules/next/dist/lib/is-app-route-route.js","../node_modules/next/dist/lib/is-edge-runtime.js","../node_modules/next/dist/lib/is-error.js","../node_modules/next/dist/lib/is-serializable-props.js","../node_modules/next/dist/lib/metadata/get-metadata-route.js","../node_modules/next/dist/lib/metadata/is-metadata-route.js","../node_modules/next/dist/lib/metadata/metadata-constants.js","../node_modules/next/dist/lib/metadata/metadata-context.js","../node_modules/next/dist/lib/multi-file-writer.js","../node_modules/next/dist/lib/non-nullable.js","../node_modules/next/dist/lib/page-types.js","../node_modules/next/dist/lib/pick.js","../node_modules/next/dist/lib/picocolors.js","../node_modules/next/dist/lib/redirect-status.js","../node_modules/next/dist/lib/scheduler.js","../node_modules/next/dist/lib/semver-noop.js","../node_modules/next/dist/lib/static-env.js","../node_modules/next/dist/lib/url.js","../node_modules/next/dist/lib/wait.js","../node_modules/next/dist/next-devtools/server/shared.js","../node_modules/next/dist/next-devtools/shared/console-error.js","../node_modules/next/dist/next-devtools/shared/forward-logs-shared.js","../node_modules/next/dist/next-devtools/userspace/app/app-dev-overlay-error-boundary.js","../node_modules/next/dist/next-devtools/userspace/app/errors/replay-ssr-only-errors.js","../node_modules/next/dist/next-devtools/userspace/app/errors/stitched-error.js","../node_modules/next/dist/next-devtools/userspace/app/errors/use-error-handler.js","../node_modules/next/dist/next-devtools/userspace/app/errors/use-forward-console-log.js","../node_modules/next/dist/next-devtools/userspace/app/forward-logs.js","../node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.js","../node_modules/next/dist/next-devtools/userspace/app/terminal-logging-config.js","../node_modules/next/dist/next-devtools/userspace/use-app-dev-rendering-indicator.js","../node_modules/next/dist/server/ReactDOMServerPages.js","../node_modules/next/dist/server/after/after-context.js","../node_modules/next/dist/server/after/awaiter.js","../node_modules/next/dist/server/after/builtin-request-context.js","../node_modules/next/dist/server/api-utils/get-cookie-parser.js","../node_modules/next/dist/server/api-utils/index.js","../node_modules/next/dist/server/api-utils/node/try-get-preview-data.js","../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../node_modules/next/dist/server/app-render/action-async-storage.external.js","../node_modules/next/dist/server/app-render/action-handler.js","../node_modules/next/dist/server/app-render/action-utils.js","../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../node_modules/next/dist/server/app-render/app-render-prerender-utils.js","../node_modules/next/dist/server/app-render/app-render-render-utils.js","../node_modules/next/dist/server/app-render/app-render.js","../node_modules/next/dist/server/app-render/async-local-storage.js","../node_modules/next/dist/server/app-render/cache-signal.js","../node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js","../node_modules/next/dist/server/app-render/create-component-tree.js","../node_modules/next/dist/server/app-render/create-error-handler.js","../node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js","../node_modules/next/dist/server/app-render/csrf-protection.js","../node_modules/next/dist/server/app-render/dynamic-rendering.js","../node_modules/next/dist/server/app-render/encryption-utils.js","../node_modules/next/dist/server/app-render/flight-render-result.js","../node_modules/next/dist/server/app-render/get-asset-query-string.js","../node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js","../node_modules/next/dist/server/app-render/get-layer-assets.js","../node_modules/next/dist/server/app-render/get-preloadable-fonts.js","../node_modules/next/dist/server/app-render/get-script-nonce-from-header.js","../node_modules/next/dist/server/app-render/get-segment-param.js","../node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js","../node_modules/next/dist/server/app-render/has-loading-component-in-tree.js","../node_modules/next/dist/server/app-render/interop-default.js","../node_modules/next/dist/server/app-render/make-get-server-inserted-html.js","../node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js","../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js","../node_modules/next/dist/server/app-render/parse-loader-tree.js","../node_modules/next/dist/server/app-render/postponed-state.js","../node_modules/next/dist/server/app-render/prospective-render-utils.js","../node_modules/next/dist/server/app-render/react-large-shell-error.js","../node_modules/next/dist/server/app-render/react-server.node.js","../node_modules/next/dist/server/app-render/render-css-resource.js","../node_modules/next/dist/server/app-render/required-scripts.js","../node_modules/next/dist/server/app-render/segment-explorer-path.js","../node_modules/next/dist/server/app-render/server-inserted-html.js","../node_modules/next/dist/server/app-render/strip-flight-headers.js","../node_modules/next/dist/server/app-render/types.js","../node_modules/next/dist/server/app-render/use-flight-response.js","../node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js","../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../node_modules/next/dist/server/app-render/work-async-storage.external.js","../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../node_modules/next/dist/server/async-storage/draft-mode-provider.js","../node_modules/next/dist/server/async-storage/request-store.js","../node_modules/next/dist/server/async-storage/work-store.js","../node_modules/next/dist/server/base-http/helpers.js","../node_modules/next/dist/server/base-http/index.js","../node_modules/next/dist/server/base-http/node.js","../node_modules/next/dist/server/base-server.js","../node_modules/next/dist/server/body-streams.js","../node_modules/next/dist/server/client-component-renderer-logger.js","../node_modules/next/dist/server/crypto-utils.js","../node_modules/next/dist/server/dev/hot-reloader-types.js","../node_modules/next/dist/server/dev/node-stack-frames.js","../node_modules/next/dist/server/dynamic-rendering-utils.js","../node_modules/next/dist/server/htmlescape.js","../node_modules/next/dist/server/image-optimizer.js","../node_modules/next/dist/server/instrumentation/utils.js","../node_modules/next/dist/server/internal-utils.js","../node_modules/next/dist/server/lib/app-dir-module.js","../node_modules/next/dist/server/lib/async-callback-set.js","../node_modules/next/dist/server/lib/cache-control.js","../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../node_modules/next/dist/server/lib/clone-response.js","../node_modules/next/dist/server/lib/decode-query-path-parameter.js","../node_modules/next/dist/server/lib/dedupe-fetch.js","../node_modules/next/dist/server/lib/etag.js","../node_modules/next/dist/server/lib/experimental/ppr.js","../node_modules/next/dist/server/lib/fix-mojibake.js","../node_modules/next/dist/server/lib/format-hostname.js","../node_modules/next/dist/server/lib/i18n-provider.js","../node_modules/next/dist/server/lib/implicit-tags.js","../node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js","../node_modules/next/dist/server/lib/incremental-cache/index.js","../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../node_modules/next/dist/server/lib/is-ipv6.js","../node_modules/next/dist/server/lib/lazy-result.js","../node_modules/next/dist/server/lib/lru-cache.js","../node_modules/next/dist/server/lib/match-next-data-pathname.js","../node_modules/next/dist/server/lib/mock-request.js","../node_modules/next/dist/server/lib/module-loader/node-module-loader.js","../node_modules/next/dist/server/lib/node-fs-methods.js","../node_modules/next/dist/server/lib/parse-stack.js","../node_modules/next/dist/server/lib/patch-fetch.js","../node_modules/next/dist/server/lib/patch-set-header.js","../node_modules/next/dist/server/lib/router-utils/decode-path-params.js","../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../node_modules/next/dist/server/lib/router-utils/is-postpone.js","../node_modules/next/dist/server/lib/router-utils/router-server-context.js","../node_modules/next/dist/server/lib/server-action-request-meta.js","../node_modules/next/dist/server/lib/server-ipc/utils.js","../node_modules/next/dist/server/lib/source-maps.js","../node_modules/next/dist/server/lib/streaming-metadata.js","../node_modules/next/dist/server/lib/to-route.js","../node_modules/next/dist/server/lib/trace/constants.js","../node_modules/next/dist/server/lib/trace/tracer.js","../node_modules/next/dist/server/lib/trace/utils.js","../node_modules/next/dist/server/load-components.js","../node_modules/next/dist/server/load-manifest.external.js","../node_modules/next/dist/server/next-server.js","../node_modules/next/dist/server/node-environment-baseline.js","../node_modules/next/dist/server/node-environment-extensions/console-dev.js","../node_modules/next/dist/server/node-environment-extensions/date.js","../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../node_modules/next/dist/server/node-environment-extensions/random.js","../node_modules/next/dist/server/node-environment-extensions/utils.js","../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../node_modules/next/dist/server/node-environment.js","../node_modules/next/dist/server/node-polyfill-crypto.js","../node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js","../node_modules/next/dist/server/normalizers/built/app/index.js","../node_modules/next/dist/server/normalizers/built/pages/index.js","../node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js","../node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js","../node_modules/next/dist/server/normalizers/locale-route-normalizer.js","../node_modules/next/dist/server/normalizers/normalizers.js","../node_modules/next/dist/server/normalizers/prefixing-normalizer.js","../node_modules/next/dist/server/normalizers/request/next-data.js","../node_modules/next/dist/server/normalizers/request/prefetch-rsc.js","../node_modules/next/dist/server/normalizers/request/prefix.js","../node_modules/next/dist/server/normalizers/request/rsc.js","../node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.js","../node_modules/next/dist/server/normalizers/request/suffix.js","../node_modules/next/dist/server/normalizers/underscore-normalizer.js","../node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js","../node_modules/next/dist/server/optimize-amp.js","../node_modules/next/dist/server/patch-error-inspect.js","../node_modules/next/dist/server/pipe-readable.js","../node_modules/next/dist/server/post-process.js","../node_modules/next/dist/server/render-result.js","../node_modules/next/dist/server/render.js","../node_modules/next/dist/server/request-meta.js","../node_modules/next/dist/server/request/fallback-params.js","../node_modules/next/dist/server/require-hook.js","../node_modules/next/dist/server/require.js","../node_modules/next/dist/server/response-cache/index.js","../node_modules/next/dist/server/response-cache/types.js","../node_modules/next/dist/server/response-cache/utils.js","../node_modules/next/dist/server/resume-data-cache/cache-store.js","../node_modules/next/dist/server/resume-data-cache/resume-data-cache.js","../node_modules/next/dist/server/revalidation-utils.js","../node_modules/next/dist/server/route-kind.js","../node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js","../node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js","../node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js","../node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js","../node_modules/next/dist/server/route-matchers/app-page-route-matcher.js","../node_modules/next/dist/server/route-matchers/app-route-route-matcher.js","../node_modules/next/dist/server/route-matchers/locale-route-matcher.js","../node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js","../node_modules/next/dist/server/route-matchers/pages-route-matcher.js","../node_modules/next/dist/server/route-matchers/route-matcher.js","../node_modules/next/dist/server/route-matches/pages-api-route-match.js","../node_modules/next/dist/server/route-modules/app-page/module.compiled.js","../node_modules/next/dist/server/route-modules/app-page/module.js","../node_modules/next/dist/server/route-modules/app-page/module.render.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js","../node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js","../node_modules/next/dist/server/route-modules/checks.js","../node_modules/next/dist/server/route-modules/pages/module.compiled.js","../node_modules/next/dist/server/route-modules/pages/module.js","../node_modules/next/dist/server/route-modules/pages/module.render.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/amp-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js","../node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js","../node_modules/next/dist/server/route-modules/route-module.js","../node_modules/next/dist/server/send-payload.js","../node_modules/next/dist/server/send-response.js","../node_modules/next/dist/server/serve-static.js","../node_modules/next/dist/server/server-utils.js","../node_modules/next/dist/server/setup-http-agent-env.js","../node_modules/next/dist/server/stream-utils/encoded-tags.js","../node_modules/next/dist/server/stream-utils/node-web-streams-helper.js","../node_modules/next/dist/server/stream-utils/uint8array-helpers.js","../node_modules/next/dist/server/use-cache/handlers.js","../node_modules/next/dist/server/utils.js","../node_modules/next/dist/server/web/adapter.js","../node_modules/next/dist/server/web/error.js","../node_modules/next/dist/server/web/get-edge-preview-props.js","../node_modules/next/dist/server/web/globals.js","../node_modules/next/dist/server/web/next-url.js","../node_modules/next/dist/server/web/sandbox/context.js","../node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js","../node_modules/next/dist/server/web/sandbox/index.js","../node_modules/next/dist/server/web/sandbox/resource-managers.js","../node_modules/next/dist/server/web/sandbox/sandbox.js","../node_modules/next/dist/server/web/spec-extension/adapters/headers.js","../node_modules/next/dist/server/web/spec-extension/adapters/next-request.js","../node_modules/next/dist/server/web/spec-extension/adapters/reflect.js","../node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js","../node_modules/next/dist/server/web/spec-extension/cookies.js","../node_modules/next/dist/server/web/spec-extension/fetch-event.js","../node_modules/next/dist/server/web/spec-extension/request.js","../node_modules/next/dist/server/web/spec-extension/response.js","../node_modules/next/dist/server/web/utils.js","../node_modules/next/dist/server/web/web-on-close.js","../node_modules/next/dist/shared/lib/amp-context.shared-runtime.js","../node_modules/next/dist/shared/lib/amp-mode.js","../node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js","../node_modules/next/dist/shared/lib/constants.js","../node_modules/next/dist/shared/lib/deep-freeze.js","../node_modules/next/dist/shared/lib/encode-uri-path.js","../node_modules/next/dist/shared/lib/error-source.js","../node_modules/next/dist/shared/lib/errors/constants.js","../node_modules/next/dist/shared/lib/escape-regexp.js","../node_modules/next/dist/shared/lib/format-webpack-messages.js","../node_modules/next/dist/shared/lib/get-hostname.js","../node_modules/next/dist/shared/lib/hash.js","../node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js","../node_modules/next/dist/shared/lib/head.js","../node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js","../node_modules/next/dist/shared/lib/html-context.shared-runtime.js","../node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js","../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js","../node_modules/next/dist/shared/lib/image-blur-svg.js","../node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js","../node_modules/next/dist/shared/lib/image-config.js","../node_modules/next/dist/shared/lib/invariant-error.js","../node_modules/next/dist/shared/lib/is-internal.js","../node_modules/next/dist/shared/lib/is-plain-object.js","../node_modules/next/dist/shared/lib/is-thenable.js","../node_modules/next/dist/shared/lib/isomorphic/path.js","../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js","../node_modules/next/dist/shared/lib/loadable.shared-runtime.js","../node_modules/next/dist/shared/lib/match-local-pattern.js","../node_modules/next/dist/shared/lib/match-remote-pattern.js","../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../node_modules/next/dist/shared/lib/normalized-asset-prefix.js","../node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js","../node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js","../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../node_modules/next/dist/shared/lib/page-path/normalize-data-path.js","../node_modules/next/dist/shared/lib/page-path/normalize-page-path.js","../node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js","../node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js","../node_modules/next/dist/shared/lib/router-context.shared-runtime.js","../node_modules/next/dist/shared/lib/router/adapters.js","../node_modules/next/dist/shared/lib/router/utils/add-locale.js","../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js","../node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js","../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js","../node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js","../node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js","../node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js","../node_modules/next/dist/shared/lib/router/utils/format-url.js","../node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js","../node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js","../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../node_modules/next/dist/shared/lib/router/utils/index.js","../node_modules/next/dist/shared/lib/router/utils/interception-routes.js","../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js","../node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js","../node_modules/next/dist/shared/lib/router/utils/parse-path.js","../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js","../node_modules/next/dist/shared/lib/router/utils/parse-url.js","../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js","../node_modules/next/dist/shared/lib/router/utils/path-match.js","../node_modules/next/dist/shared/lib/router/utils/prepare-destination.js","../node_modules/next/dist/shared/lib/router/utils/querystring.js","../node_modules/next/dist/shared/lib/router/utils/relativize-url.js","../node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js","../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js","../node_modules/next/dist/shared/lib/router/utils/route-matcher.js","../node_modules/next/dist/shared/lib/router/utils/route-regex.js","../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js","../node_modules/next/dist/shared/lib/runtime-config.external.js","../node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js","../node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js","../node_modules/next/dist/shared/lib/segment.js","../node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js","../node_modules/next/dist/shared/lib/server-reference-info.js","../node_modules/next/dist/shared/lib/side-effect.js","../node_modules/next/dist/shared/lib/utils.js","../node_modules/next/dist/shared/lib/utils/warn-once.js","../node_modules/next/package.json","../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js","../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../node_modules/react-dom/cjs/react-dom-server.node.production.min.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/index.js","../node_modules/react-dom/package.json","../node_modules/react-dom/server.browser.js","../node_modules/react-dom/server.js","../node_modules/react-dom/server.node.js","../node_modules/react/cjs/react-jsx-dev-runtime.production.min.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/jsx-dev-runtime.js","../node_modules/react/jsx-runtime.js","../node_modules/react/package.json","../node_modules/scheduler/cjs/scheduler.development.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../node_modules/scheduler/package.json","../node_modules/semver/classes/comparator.js","../node_modules/semver/classes/range.js","../node_modules/semver/classes/semver.js","../node_modules/semver/functions/cmp.js","../node_modules/semver/functions/coerce.js","../node_modules/semver/functions/compare.js","../node_modules/semver/functions/eq.js","../node_modules/semver/functions/gt.js","../node_modules/semver/functions/gte.js","../node_modules/semver/functions/lt.js","../node_modules/semver/functions/lte.js","../node_modules/semver/functions/neq.js","../node_modules/semver/functions/parse.js","../node_modules/semver/functions/satisfies.js","../node_modules/semver/internal/constants.js","../node_modules/semver/internal/debug.js","../node_modules/semver/internal/identifiers.js","../node_modules/semver/internal/lrucache.js","../node_modules/semver/internal/parse-options.js","../node_modules/semver/internal/re.js","../node_modules/semver/package.json","../node_modules/sharp/lib/channel.js","../node_modules/sharp/lib/colour.js","../node_modules/sharp/lib/composite.js","../node_modules/sharp/lib/constructor.js","../node_modules/sharp/lib/index.js","../node_modules/sharp/lib/input.js","../node_modules/sharp/lib/is.js","../node_modules/sharp/lib/libvips.js","../node_modules/sharp/lib/operation.js","../node_modules/sharp/lib/output.js","../node_modules/sharp/lib/resize.js","../node_modules/sharp/lib/sharp.js","../node_modules/sharp/lib/utility.js","../node_modules/sharp/package.json","../node_modules/simple-swizzle/index.js","../node_modules/simple-swizzle/node_modules/is-arrayish/index.js","../node_modules/simple-swizzle/node_modules/is-arrayish/package.json","../node_modules/simple-swizzle/package.json","../node_modules/styled-jsx/dist/index/index.js","../node_modules/styled-jsx/index.js","../node_modules/styled-jsx/package.json","../node_modules/styled-jsx/style.js","package.json"]} \ No newline at end of file diff --git a/.next/package.json b/.next/package.json new file mode 100644 index 0000000..7156107 --- /dev/null +++ b/.next/package.json @@ -0,0 +1 @@ +{"type": "commonjs"} \ No newline at end of file diff --git a/.next/prerender-manifest.json b/.next/prerender-manifest.json new file mode 100644 index 0000000..58ee779 --- /dev/null +++ b/.next/prerender-manifest.json @@ -0,0 +1,11 @@ +{ + "version": 4, + "routes": {}, + "dynamicRoutes": {}, + "preview": { + "previewModeId": "d795978c4257309f42950b4abd879f23", + "previewModeSigningKey": "05927a0bce54694581c537bcb1e3ef04d9dc93dca3a5721274fafdff3c7f16e4", + "previewModeEncryptionKey": "e38ae08d93a646354e380eb4ec892454450f2b82dd4a29b998c52d47333cee57" + }, + "notFoundRoutes": [] +} \ No newline at end of file diff --git a/.next/react-loadable-manifest.json b/.next/react-loadable-manifest.json new file mode 100644 index 0000000..5fa8049 --- /dev/null +++ b/.next/react-loadable-manifest.json @@ -0,0 +1,10 @@ +{ + "pages/index.tsx -> ../src/App": { + "id": 9639, + "files": [ + "static/chunks/5330eab6.0e905b95dc8a5a19.js", + "static/chunks/469.31893841137c9659.js", + "static/chunks/639.879f3c63a68ab0ec.js" + ] + } +} \ No newline at end of file diff --git a/.next/required-server-files.json b/.next/required-server-files.json new file mode 100644 index 0000000..27c5c9d --- /dev/null +++ b/.next/required-server-files.json @@ -0,0 +1,320 @@ +{ + "version": 1, + "config": { + "env": {}, + "webpack": null, + "eslint": { + "ignoreDuringBuilds": false + }, + "typescript": { + "ignoreBuildErrors": false, + "tsconfigPath": "tsconfig.json" + }, + "distDir": ".next", + "cleanDistDir": true, + "assetPrefix": "", + "cacheMaxMemorySize": 52428800, + "configOrigin": "next.config.js", + "useFileSystemPublicRoutes": true, + "generateEtags": true, + "pageExtensions": [ + "tsx", + "ts", + "jsx", + "js" + ], + "poweredByHeader": true, + "compress": true, + "images": { + "deviceSizes": [ + 640, + 750, + 828, + 1080, + 1200, + 1920, + 2048, + 3840 + ], + "imageSizes": [ + 16, + 32, + 48, + 64, + 96, + 128, + 256, + 384 + ], + "path": "/_next/image", + "loader": "default", + "loaderFile": "", + "domains": [ + "api.scryfall.com", + "images.pokemontcg.io", + "lorcana-api.com" + ], + "disableStaticImages": false, + "minimumCacheTTL": 60, + "formats": [ + "image/webp" + ], + "dangerouslyAllowSVG": false, + "contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;", + "contentDispositionType": "attachment", + "remotePatterns": [], + "unoptimized": false + }, + "devIndicators": { + "position": "bottom-left" + }, + "onDemandEntries": { + "maxInactiveAge": 60000, + "pagesBufferLength": 5 + }, + "amp": { + "canonicalBase": "" + }, + "basePath": "", + "sassOptions": {}, + "trailingSlash": false, + "i18n": null, + "productionBrowserSourceMaps": false, + "excludeDefaultMomentLocales": true, + "serverRuntimeConfig": {}, + "publicRuntimeConfig": {}, + "reactProductionProfiling": false, + "reactStrictMode": null, + "reactMaxHeadersLength": 6000, + "httpAgentOptions": { + "keepAlive": true + }, + "logging": {}, + "compiler": {}, + "expireTime": 31536000, + "staticPageGenerationTimeout": 60, + "modularizeImports": { + "@mui/icons-material": { + "transform": "@mui/icons-material/{{member}}" + }, + "lodash": { + "transform": "lodash/{{member}}" + } + }, + "outputFileTracingRoot": "/Users/rstillw/Documents/tcg-vault", + "experimental": { + "useSkewCookie": false, + "nodeMiddleware": false, + "cacheLife": { + "default": { + "stale": 300, + "revalidate": 900, + "expire": 4294967294 + }, + "seconds": { + "stale": 0, + "revalidate": 1, + "expire": 60 + }, + "minutes": { + "stale": 300, + "revalidate": 60, + "expire": 3600 + }, + "hours": { + "stale": 300, + "revalidate": 3600, + "expire": 86400 + }, + "days": { + "stale": 300, + "revalidate": 86400, + "expire": 604800 + }, + "weeks": { + "stale": 300, + "revalidate": 604800, + "expire": 2592000 + }, + "max": { + "stale": 300, + "revalidate": 2592000, + "expire": 4294967294 + } + }, + "cacheHandlers": {}, + "cssChunking": true, + "multiZoneDraftMode": false, + "appNavFailHandling": false, + "prerenderEarlyExit": true, + "serverMinification": true, + "serverSourceMaps": false, + "linkNoTouchStart": false, + "caseSensitiveRoutes": false, + "clientSegmentCache": false, + "dynamicOnHover": false, + "preloadEntriesOnStart": true, + "clientRouterFilter": true, + "clientRouterFilterRedirects": false, + "fetchCacheKeyPrefix": "", + "middlewarePrefetch": "flexible", + "optimisticClientCache": true, + "manualClientBasePath": false, + "cpus": 13, + "memoryBasedWorkersCount": false, + "imgOptConcurrency": null, + "imgOptTimeoutInSeconds": 7, + "imgOptMaxInputPixels": 268402689, + "imgOptSequentialRead": null, + "isrFlushToDisk": true, + "workerThreads": false, + "optimizeCss": false, + "nextScriptWorkers": false, + "scrollRestoration": false, + "externalDir": false, + "disableOptimizedLoading": false, + "gzipSize": true, + "craCompat": false, + "esmExternals": true, + "fullySpecified": false, + "swcTraceProfiling": false, + "forceSwcTransforms": false, + "largePageDataBytes": 128000, + "typedRoutes": false, + "typedEnv": false, + "parallelServerCompiles": false, + "parallelServerBuildTraces": false, + "ppr": false, + "authInterrupts": false, + "webpackMemoryOptimizations": false, + "optimizeServerReact": true, + "viewTransition": false, + "routerBFCache": false, + "removeUncaughtErrorAndRejectionListeners": false, + "validateRSCRequestHeaders": false, + "staleTimes": { + "dynamic": 0, + "static": 300 + }, + "serverComponentsHmrCache": true, + "staticGenerationMaxConcurrency": 8, + "staticGenerationMinPagesPerWorker": 25, + "dynamicIO": false, + "inlineCss": false, + "useCache": false, + "globalNotFound": false, + "devtoolNewPanelUI": false, + "devtoolSegmentExplorer": false, + "browserDebugInfoInTerminal": false, + "optimizeRouterScrolling": false, + "strictNextHead": true, + "optimizePackageImports": [ + "lucide-react", + "date-fns", + "lodash-es", + "ramda", + "antd", + "react-bootstrap", + "ahooks", + "@ant-design/icons", + "@headlessui/react", + "@headlessui-float/react", + "@heroicons/react/20/solid", + "@heroicons/react/24/solid", + "@heroicons/react/24/outline", + "@visx/visx", + "@tremor/react", + "rxjs", + "@mui/material", + "@mui/icons-material", + "recharts", + "react-use", + "effect", + "@effect/schema", + "@effect/platform", + "@effect/platform-node", + "@effect/platform-browser", + "@effect/platform-bun", + "@effect/sql", + "@effect/sql-mssql", + "@effect/sql-mysql2", + "@effect/sql-pg", + "@effect/sql-sqlite-node", + "@effect/sql-sqlite-bun", + "@effect/sql-sqlite-wasm", + "@effect/sql-sqlite-react-native", + "@effect/rpc", + "@effect/rpc-http", + "@effect/typeclass", + "@effect/experimental", + "@effect/opentelemetry", + "@material-ui/core", + "@material-ui/icons", + "@tabler/icons-react", + "mui-core", + "react-icons/ai", + "react-icons/bi", + "react-icons/bs", + "react-icons/cg", + "react-icons/ci", + "react-icons/di", + "react-icons/fa", + "react-icons/fa6", + "react-icons/fc", + "react-icons/fi", + "react-icons/gi", + "react-icons/go", + "react-icons/gr", + "react-icons/hi", + "react-icons/hi2", + "react-icons/im", + "react-icons/io", + "react-icons/io5", + "react-icons/lia", + "react-icons/lib", + "react-icons/lu", + "react-icons/md", + "react-icons/pi", + "react-icons/ri", + "react-icons/rx", + "react-icons/si", + "react-icons/sl", + "react-icons/tb", + "react-icons/tfi", + "react-icons/ti", + "react-icons/vsc", + "react-icons/wi" + ], + "trustHostHeader": false, + "isExperimentalCompile": false + }, + "htmlLimitedBots": "Mediapartners-Google|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti", + "bundlePagesRouterDependencies": false, + "configFileName": "next.config.js", + "turbopack": { + "root": "/Users/rstillw/Documents/tcg-vault" + } + }, + "appDir": "/Users/rstillw/Documents/tcg-vault", + "relativeAppDir": "", + "files": [ + ".next/routes-manifest.json", + ".next/server/pages-manifest.json", + ".next/build-manifest.json", + ".next/prerender-manifest.json", + ".next/server/functions-config-manifest.json", + ".next/server/middleware-manifest.json", + ".next/server/middleware-build-manifest.js", + ".next/server/middleware-react-loadable-manifest.js", + ".next/react-loadable-manifest.json", + ".next/dynamic-css-manifest.json", + ".next/server/dynamic-css-manifest.js", + ".next/BUILD_ID", + ".next/server/next-font-manifest.js", + ".next/server/next-font-manifest.json", + ".next/required-server-files.json" + ], + "ignore": [ + "node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*" + ] +} \ No newline at end of file diff --git a/.next/routes-manifest.json b/.next/routes-manifest.json new file mode 100644 index 0000000..b330fc5 --- /dev/null +++ b/.next/routes-manifest.json @@ -0,0 +1,66 @@ +{ + "version": 3, + "pages404": true, + "caseSensitive": false, + "basePath": "", + "redirects": [ + { + "source": "/:path+/", + "destination": "/:path+", + "internal": true, + "statusCode": 308, + "regex": "^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$" + } + ], + "headers": [ + { + "source": "/api/(.*)", + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET, POST, PUT, DELETE, OPTIONS" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "Content-Type, Authorization" + } + ], + "regex": "^/api(?:/(.*))(?:/)?$" + } + ], + "rewrites": { + "beforeFiles": [], + "afterFiles": [], + "fallback": [] + }, + "dynamicRoutes": [], + "staticRoutes": [ + { + "page": "/", + "regex": "^/(?:/)?$", + "routeKeys": {}, + "namedRegex": "^/(?:/)?$" + } + ], + "dataRoutes": [], + "rsc": { + "header": "RSC", + "varyHeader": "RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch", + "prefetchHeader": "Next-Router-Prefetch", + "didPostponeHeader": "x-nextjs-postponed", + "contentTypeHeader": "text/x-component", + "suffix": ".rsc", + "prefetchSuffix": ".prefetch.rsc", + "prefetchSegmentHeader": "Next-Router-Segment-Prefetch", + "prefetchSegmentSuffix": ".segment.rsc", + "prefetchSegmentDirSuffix": ".segments" + }, + "rewriteHeaders": { + "pathHeader": "x-nextjs-rewritten-path", + "queryHeader": "x-nextjs-rewritten-query" + } +} \ No newline at end of file diff --git a/.next/server/chunks/616.js b/.next/server/chunks/616.js new file mode 100644 index 0000000..90fe5d2 --- /dev/null +++ b/.next/server/chunks/616.js @@ -0,0 +1,6 @@ +exports.id=616,exports.ids=[616],exports.modules={92:(a,b,c)=>{"use strict";a.exports=c(3885).vendored.contexts.HtmlContext},202:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"normalizePagePath",{enumerable:!0,get:function(){return g}});let d=c(9590),e=c(6275),f=c(4718);function g(a){let b=/^\/index(\/|$)/.test(a)&&!(0,e.isDynamicRoute)(a)?"/index"+a:"/"===a?"/index":(0,d.ensureLeadingSlash)(a);{let{posix:a}=c(3873),d=a.normalize(b);if(d!==b)throw new f.NormalizeError("Requested and resolved page mismatch: "+b+" "+d)}return b}},229:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isDynamicRoute",{enumerable:!0,get:function(){return g}});let d=c(6580),e=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,f=/\/\[[^/]+\](?=\/|$)/;function g(a,b){return(void 0===b&&(b=!0),(0,d.isInterceptionRouteAppPath)(a)&&(a=(0,d.extractInterceptionRouteInformation)(a).interceptedRoute),b)?f.test(a):e.test(a)}},737:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{normalizeAppPath:function(){return f},normalizeRscURL:function(){return g}});let d=c(9590),e=c(7286);function f(a){return(0,d.ensureLeadingSlash)(a.split("/").reduce((a,b,c,d)=>!b||(0,e.isGroupSegment)(b)||"@"===b[0]||("page"===b||"route"===b)&&c===d.length-1?a:a+"/"+b,""))}function g(a){return a.replace(/\.rsc($|\?)/,"$1")}},772:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{AppRenderSpan:function(){return i},AppRouteRouteHandlersSpan:function(){return l},BaseServerSpan:function(){return c},LoadComponentsSpan:function(){return d},LogSpanAllowList:function(){return p},MiddlewareSpan:function(){return n},NextNodeServerSpan:function(){return f},NextServerSpan:function(){return e},NextVanillaSpanAllowlist:function(){return o},NodeSpan:function(){return k},RenderSpan:function(){return h},ResolveMetadataSpan:function(){return m},RouterSpan:function(){return j},StartServerSpan:function(){return g}});var c=function(a){return a.handleRequest="BaseServer.handleRequest",a.run="BaseServer.run",a.pipe="BaseServer.pipe",a.getStaticHTML="BaseServer.getStaticHTML",a.render="BaseServer.render",a.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",a.renderToResponse="BaseServer.renderToResponse",a.renderToHTML="BaseServer.renderToHTML",a.renderError="BaseServer.renderError",a.renderErrorToResponse="BaseServer.renderErrorToResponse",a.renderErrorToHTML="BaseServer.renderErrorToHTML",a.render404="BaseServer.render404",a}(c||{}),d=function(a){return a.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",a.loadComponents="LoadComponents.loadComponents",a}(d||{}),e=function(a){return a.getRequestHandler="NextServer.getRequestHandler",a.getServer="NextServer.getServer",a.getServerRequestHandler="NextServer.getServerRequestHandler",a.createServer="createServer.createServer",a}(e||{}),f=function(a){return a.compression="NextNodeServer.compression",a.getBuildId="NextNodeServer.getBuildId",a.createComponentTree="NextNodeServer.createComponentTree",a.clientComponentLoading="NextNodeServer.clientComponentLoading",a.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",a.generateStaticRoutes="NextNodeServer.generateStaticRoutes",a.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",a.generatePublicRoutes="NextNodeServer.generatePublicRoutes",a.generateImageRoutes="NextNodeServer.generateImageRoutes.route",a.sendRenderResult="NextNodeServer.sendRenderResult",a.proxyRequest="NextNodeServer.proxyRequest",a.runApi="NextNodeServer.runApi",a.render="NextNodeServer.render",a.renderHTML="NextNodeServer.renderHTML",a.imageOptimizer="NextNodeServer.imageOptimizer",a.getPagePath="NextNodeServer.getPagePath",a.getRoutesManifest="NextNodeServer.getRoutesManifest",a.findPageComponents="NextNodeServer.findPageComponents",a.getFontManifest="NextNodeServer.getFontManifest",a.getServerComponentManifest="NextNodeServer.getServerComponentManifest",a.getRequestHandler="NextNodeServer.getRequestHandler",a.renderToHTML="NextNodeServer.renderToHTML",a.renderError="NextNodeServer.renderError",a.renderErrorToHTML="NextNodeServer.renderErrorToHTML",a.render404="NextNodeServer.render404",a.startResponse="NextNodeServer.startResponse",a.route="route",a.onProxyReq="onProxyReq",a.apiResolver="apiResolver",a.internalFetch="internalFetch",a}(f||{}),g=function(a){return a.startServer="startServer.startServer",a}(g||{}),h=function(a){return a.getServerSideProps="Render.getServerSideProps",a.getStaticProps="Render.getStaticProps",a.renderToString="Render.renderToString",a.renderDocument="Render.renderDocument",a.createBodyResult="Render.createBodyResult",a}(h||{}),i=function(a){return a.renderToString="AppRender.renderToString",a.renderToReadableStream="AppRender.renderToReadableStream",a.getBodyResult="AppRender.getBodyResult",a.fetch="AppRender.fetch",a}(i||{}),j=function(a){return a.executeRoute="Router.executeRoute",a}(j||{}),k=function(a){return a.runHandler="Node.runHandler",a}(k||{}),l=function(a){return a.runHandler="AppRouteRouteHandlers.runHandler",a}(l||{}),m=function(a){return a.generateMetadata="ResolveMetadata.generateMetadata",a.generateViewport="ResolveMetadata.generateViewport",a}(m||{}),n=function(a){return a.execute="Middleware.execute",a}(n||{});let o=["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"],p=["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"]},1086:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{APP_BUILD_MANIFEST:function(){return t},APP_CLIENT_INTERNALS:function(){return Z},APP_PATHS_MANIFEST:function(){return q},APP_PATH_ROUTES_MANIFEST:function(){return r},BARREL_OPTIMIZATION_PREFIX:function(){return Q},BLOCKED_PAGES:function(){return L},BUILD_ID_FILE:function(){return K},BUILD_MANIFEST:function(){return s},CLIENT_PUBLIC_FILES_PATH:function(){return M},CLIENT_REFERENCE_MANIFEST:function(){return R},CLIENT_STATIC_FILES_PATH:function(){return N},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return _},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return X},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return Y},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return ab},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ac},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return $},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return aa},COMPILER_INDEXES:function(){return f},COMPILER_NAMES:function(){return e},CONFIG_FILES:function(){return J},DEFAULT_RUNTIME_WEBPACK:function(){return ad},DEFAULT_SANS_SERIF_FONT:function(){return ai},DEFAULT_SERIF_FONT:function(){return ah},DEV_CLIENT_MIDDLEWARE_MANIFEST:function(){return G},DEV_CLIENT_PAGES_MANIFEST:function(){return D},DYNAMIC_CSS_MANIFEST:function(){return W},EDGE_RUNTIME_WEBPACK:function(){return ae},EDGE_UNSUPPORTED_NODE_APIS:function(){return an},EXPORT_DETAIL:function(){return y},EXPORT_MARKER:function(){return x},FUNCTIONS_CONFIG_MANIFEST:function(){return u},IMAGES_MANIFEST:function(){return B},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return V},MIDDLEWARE_BUILD_MANIFEST:function(){return T},MIDDLEWARE_MANIFEST:function(){return E},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return U},MODERN_BROWSERSLIST_TARGET:function(){return d.default},NEXT_BUILTIN_DOCUMENT:function(){return P},NEXT_FONT_MANIFEST:function(){return w},PAGES_MANIFEST:function(){return o},PHASE_DEVELOPMENT_SERVER:function(){return l},PHASE_EXPORT:function(){return i},PHASE_INFO:function(){return n},PHASE_PRODUCTION_BUILD:function(){return j},PHASE_PRODUCTION_SERVER:function(){return k},PHASE_TEST:function(){return m},PRERENDER_MANIFEST:function(){return z},REACT_LOADABLE_MANIFEST:function(){return H},ROUTES_MANIFEST:function(){return A},RSC_MODULE_TYPES:function(){return am},SERVER_DIRECTORY:function(){return I},SERVER_FILES_MANIFEST:function(){return C},SERVER_PROPS_ID:function(){return ag},SERVER_REFERENCE_MANIFEST:function(){return S},STATIC_PROPS_ID:function(){return af},STATIC_STATUS_PAGES:function(){return aj},STRING_LITERAL_DROP_BUNDLE:function(){return O},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return v},SYSTEM_ENTRYPOINTS:function(){return ao},TRACE_OUTPUT_VERSION:function(){return ak},TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST:function(){return F},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return al},UNDERSCORE_NOT_FOUND_ROUTE:function(){return g},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return h},WEBPACK_STATS:function(){return p}});let d=c(7020)._(c(3754)),e={client:"client",server:"server",edgeServer:"edge-server"},f={[e.client]:0,[e.server]:1,[e.edgeServer]:2},g="/_not-found",h=""+g+"/page",i="phase-export",j="phase-production-build",k="phase-production-server",l="phase-development-server",m="phase-test",n="phase-info",o="pages-manifest.json",p="webpack-stats.json",q="app-paths-manifest.json",r="app-path-routes-manifest.json",s="build-manifest.json",t="app-build-manifest.json",u="functions-config-manifest.json",v="subresource-integrity-manifest",w="next-font-manifest",x="export-marker.json",y="export-detail.json",z="prerender-manifest.json",A="routes-manifest.json",B="images-manifest.json",C="required-server-files.json",D="_devPagesManifest.json",E="middleware-manifest.json",F="_clientMiddlewareManifest.json",G="_devMiddlewareManifest.json",H="react-loadable-manifest.json",I="server",J=["next.config.js","next.config.mjs","next.config.ts"],K="BUILD_ID",L=["/_document","/_app","/_error"],M="public",N="static",O="__NEXT_DROP_CLIENT_FILE__",P="__NEXT_BUILTIN_DOCUMENT__",Q="__barrel_optimize__",R="client-reference-manifest",S="server-reference-manifest",T="middleware-build-manifest",U="middleware-react-loadable-manifest",V="interception-route-rewrite-manifest",W="dynamic-css-manifest",X="main",Y=""+X+"-app",Z="app-pages-internals",$="react-refresh",_="amp",aa="webpack",ab="polyfills",ac=Symbol(ab),ad="webpack-runtime",ae="edge-runtime-webpack",af="__N_SSG",ag="__N_SSP",ah={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},ai={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},aj=["/500"],ak=1,al=6e3,am={client:"client",server:"server"},an=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],ao=new Set([X,$,_,Y]);("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},1093:(a,b)=>{"use strict";function c(a){return a.replace(/\\/g,"/")}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"normalizePathSep",{enumerable:!0,get:function(){return c}})},1644:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{default:function(){return e},getProperError:function(){return f}});let d=c(5704);function e(a){return"object"==typeof a&&null!==a&&"name"in a&&"message"in a}function f(a){return e(a)?a:Object.defineProperty(Error((0,d.isPlainObject)(a)?function(a){let b=new WeakSet;return JSON.stringify(a,(a,c)=>{if("object"==typeof c&&null!==c){if(b.has(c))return"[Circular]";b.add(c)}return c})}(a):a+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},1749:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"denormalizePagePath",{enumerable:!0,get:function(){return f}});let d=c(6275),e=c(1093);function f(a){let b=(0,e.normalizePathSep)(a);return b.startsWith("/index/")&&!(0,d.isDynamicRoute)(b)?b.slice(6):"/index"!==b?b:"/"}},2337:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{ESCAPE_REGEX:function(){return d},htmlEscapeJsonString:function(){return e}});let c={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},d=/[&><\u2028\u2029]/g;function e(a){return a.replace(d,a=>c[a])}},2410:(a,b,c)=>{"use strict";let d;Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{BubbledError:function(){return m},SpanKind:function(){return k},SpanStatusCode:function(){return j},getTracer:function(){return u},isBubbledError:function(){return n}});let e=c(772),f=c(4345);try{d=c(6962)}catch(a){d=c(6962)}let{context:g,propagation:h,trace:i,SpanStatusCode:j,SpanKind:k,ROOT_CONTEXT:l}=d;class m extends Error{constructor(a,b){super(),this.bubble=a,this.result=b}}function n(a){return"object"==typeof a&&null!==a&&a instanceof m}let o=(a,b)=>{n(b)&&b.bubble?a.setAttribute("next.bubble",!0):(b&&a.recordException(b),a.setStatus({code:j.ERROR,message:null==b?void 0:b.message})),a.end()},p=new Map,q=d.createContextKey("next.rootSpanId"),r=0,s={set(a,b,c){a.push({key:b,value:c})}};class t{getTracerInstance(){return i.getTracer("next.js","0.0.1")}getContext(){return g}getTracePropagationData(){let a=g.active(),b=[];return h.inject(a,b,s),b}getActiveScopeSpan(){return i.getSpan(null==g?void 0:g.active())}withPropagatedContext(a,b,c){let d=g.active();if(i.getSpanContext(d))return b();let e=h.extract(d,a,c);return g.with(e,b)}trace(...a){var b;let[c,d,h]=a,{fn:j,options:k}="function"==typeof d?{fn:d,options:{}}:{fn:h,options:{...d}},m=k.spanName??c;if(!e.NextVanillaSpanAllowlist.includes(c)&&"1"!==process.env.NEXT_OTEL_VERBOSE||k.hideSpan)return j();let n=this.getSpanContext((null==k?void 0:k.parentSpan)??this.getActiveScopeSpan()),s=!1;n?(null==(b=i.getSpanContext(n))?void 0:b.isRemote)&&(s=!0):(n=(null==g?void 0:g.active())??l,s=!0);let t=r++;return k.attributes={"next.span_name":m,"next.span_type":c,...k.attributes},g.with(n.setValue(q,t),()=>this.getTracerInstance().startActiveSpan(m,k,a=>{let b="performance"in globalThis&&"measure"in performance?globalThis.performance.now():void 0,d=()=>{p.delete(t),b&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX&&e.LogSpanAllowList.includes(c||"")&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(c.split(".").pop()||"").replace(/[A-Z]/g,a=>"-"+a.toLowerCase())}`,{start:b,end:performance.now()})};s&&p.set(t,new Map(Object.entries(k.attributes??{})));try{if(j.length>1)return j(a,b=>o(a,b));let b=j(a);if((0,f.isThenable)(b))return b.then(b=>(a.end(),b)).catch(b=>{throw o(a,b),b}).finally(d);return a.end(),d(),b}catch(b){throw o(a,b),d(),b}}))}wrap(...a){let b=this,[c,d,f]=3===a.length?a:[a[0],{},a[1]];return e.NextVanillaSpanAllowlist.includes(c)||"1"===process.env.NEXT_OTEL_VERBOSE?function(){let a=d;"function"==typeof a&&"function"==typeof f&&(a=a.apply(this,arguments));let e=arguments.length-1,h=arguments[e];if("function"!=typeof h)return b.trace(c,a,()=>f.apply(this,arguments));{let d=b.getContext().bind(g.active(),h);return b.trace(c,a,(a,b)=>(arguments[e]=function(a){return null==b||b(a),d.apply(this,arguments)},f.apply(this,arguments)))}}:f}startSpan(...a){let[b,c]=a,d=this.getSpanContext((null==c?void 0:c.parentSpan)??this.getActiveScopeSpan());return this.getTracerInstance().startSpan(b,c,d)}getSpanContext(a){return a?i.setSpan(g.active(),a):void 0}getRootSpanAttributes(){let a=g.active().getValue(q);return p.get(a)}setRootSpanAttribute(a,b){let c=g.active().getValue(q),d=p.get(c);d&&d.set(a,b)}}let u=(()=>{let a=new t;return()=>a})()},3135:(a,b)=>{"use strict";Object.defineProperty(b,"A",{enumerable:!0,get:function(){return e}});let c=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],d=(a,b)=>{let c=a;return"string"==typeof b?c=a.toLocaleString(b):!0===b&&(c=a.toLocaleString()),c};function e(a,b){if(!Number.isFinite(a))throw Object.defineProperty(TypeError(`Expected a finite number, got ${typeof a}: ${a}`),"__NEXT_ERROR_CODE",{value:"E572",enumerable:!1,configurable:!0});if((b=Object.assign({},b)).signed&&0===a)return" 0 B";let e=a<0,f=e?"-":b.signed?"+":"";if(e&&(a=-a),a<1)return f+d(a,b.locale)+" B";let g=Math.min(Math.floor(Math.log10(a)/3),c.length-1);return f+d(a=Number((a/Math.pow(1e3,g)).toPrecision(3)),b.locale)+" "+c[g]}},3754:a=>{"use strict";a.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},3885:(a,b,c)=>{"use strict";a.exports=c(361)},4345:(a,b)=>{"use strict";function c(a){return null!==a&&"object"==typeof a&&"then"in a&&"function"==typeof a.then}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isThenable",{enumerable:!0,get:function(){return c}})},4718:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DecodeError:function(){return o},MiddlewareNotFoundError:function(){return s},MissingStaticPage:function(){return r},NormalizeError:function(){return p},PageNotFoundError:function(){return q},SP:function(){return m},ST:function(){return n},WEB_VITALS:function(){return c},execOnce:function(){return d},getDisplayName:function(){return i},getLocationOrigin:function(){return g},getURL:function(){return h},isAbsoluteUrl:function(){return f},isResSent:function(){return j},loadGetInitialProps:function(){return l},normalizeRepeatedSlashes:function(){return k},stringifyError:function(){return t}});let c=["CLS","FCP","FID","INP","LCP","TTFB"];function d(a){let b,c=!1;return function(){for(var d=arguments.length,e=Array(d),f=0;fe.test(a);function g(){let{protocol:a,hostname:b,port:c}=window.location;return a+"//"+b+(c?":"+c:"")}function h(){let{href:a}=window.location,b=g();return a.substring(b.length)}function i(a){return"string"==typeof a?a:a.displayName||a.name||"Unknown"}function j(a){return a.finished||a.headersSent}function k(a){let b=a.split("?");return b[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(b[1]?"?"+b.slice(1).join("?"):"")}async function l(a,b){let c=b.res||b.ctx&&b.ctx.res;if(!a.getInitialProps)return b.ctx&&b.Component?{pageProps:await l(b.Component,b.ctx)}:{};let d=await a.getInitialProps(b);if(c&&j(c))return d;if(!d)throw Object.defineProperty(Error('"'+i(a)+'.getInitialProps()" should resolve to an object. But found "'+d+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d}let m="undefined"!=typeof performance,n=m&&["mark","measure","getEntriesByName"].every(a=>"function"==typeof performance[a]);class o extends Error{}class p extends Error{}class q extends Error{constructor(a){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+a}}class r extends Error{constructor(a,b){super(),this.message="Failed to load static file for page: "+a+" "+b}}class s extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function t(a){return JSON.stringify({message:a.message,stack:a.stack})}},4865:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getSortedRouteObjects:function(){return e},getSortedRoutes:function(){return d}});class c{insert(a){this._insert(a.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(a){void 0===a&&(a="/");let b=[...this.children.keys()].sort();null!==this.slugName&&b.splice(b.indexOf("[]"),1),null!==this.restSlugName&&b.splice(b.indexOf("[...]"),1),null!==this.optionalRestSlugName&&b.splice(b.indexOf("[[...]]"),1);let c=b.map(b=>this.children.get(b)._smoosh(""+a+b+"/")).reduce((a,b)=>[...a,...b],[]);if(null!==this.slugName&&c.push(...this.children.get("[]")._smoosh(a+"["+this.slugName+"]/")),!this.placeholder){let b="/"===a?"/":a.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot define a route with the same specificity as a optional catch-all route ("'+b+'" and "'+b+"[[..."+this.optionalRestSlugName+']]").'),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});c.unshift(b)}return null!==this.restSlugName&&c.push(...this.children.get("[...]")._smoosh(a+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&c.push(...this.children.get("[[...]]")._smoosh(a+"[[..."+this.optionalRestSlugName+"]]/")),c}_insert(a,b,d){if(0===a.length){this.placeholder=!1;return}if(d)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let e=a[0];if(e.startsWith("[")&&e.endsWith("]")){let c=e.slice(1,-1),g=!1;if(c.startsWith("[")&&c.endsWith("]")&&(c=c.slice(1,-1),g=!0),c.startsWith("…"))throw Object.defineProperty(Error("Detected a three-dot character ('…') at ('"+c+"'). Did you mean ('...')?"),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(c.startsWith("...")&&(c=c.substring(3),d=!0),c.startsWith("[")||c.endsWith("]"))throw Object.defineProperty(Error("Segment names may not start or end with extra brackets ('"+c+"')."),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(c.startsWith("."))throw Object.defineProperty(Error("Segment names may not start with erroneous periods ('"+c+"')."),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function f(a,c){if(null!==a&&a!==c)throw Object.defineProperty(Error("You cannot use different slug names for the same dynamic path ('"+a+"' !== '"+c+"')."),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});b.forEach(a=>{if(a===c)throw Object.defineProperty(Error('You cannot have the same slug name "'+c+'" repeat within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(a.replace(/\W/g,"")===e.replace(/\W/g,""))throw Object.defineProperty(Error('You cannot have the slug names "'+a+'" and "'+c+'" differ only by non-word symbols within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),b.push(c)}if(d)if(g){if(null!=this.restSlugName)throw Object.defineProperty(Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+a[0]+'" ).'),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});f(this.optionalRestSlugName,c),this.optionalRestSlugName=c,e="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+a[0]+'").'),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});f(this.restSlugName,c),this.restSlugName=c,e="[...]"}else{if(g)throw Object.defineProperty(Error('Optional route parameters are not yet supported ("'+a[0]+'").'),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});f(this.slugName,c),this.slugName=c,e="[]"}}this.children.has(e)||this.children.set(e,new c),this.children.get(e)._insert(a.slice(1),b,d)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function d(a){let b=new c;return a.forEach(a=>b.insert(a)),b.smoosh()}function e(a,b){let c={},e=[];for(let d=0;da[c[b]])}},5296:(a,b)=>{"use strict";function c(a){return a.split("/").map(a=>encodeURIComponent(a)).join("/")}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"encodeURIPath",{enumerable:!0,get:function(){return c}})},5704:(a,b)=>{"use strict";function c(a){return Object.prototype.toString.call(a)}function d(a){if("[object Object]"!==c(a))return!1;let b=Object.getPrototypeOf(a);return null===b||b.hasOwnProperty("isPrototypeOf")}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getObjectClassLabel:function(){return c},isPlainObject:function(){return d}})},6275:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getSortedRouteObjects:function(){return d.getSortedRouteObjects},getSortedRoutes:function(){return d.getSortedRoutes},isDynamicRoute:function(){return e.isDynamicRoute}});let d=c(4865),e=c(229)},6580:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{INTERCEPTION_ROUTE_MARKERS:function(){return e},extractInterceptionRouteInformation:function(){return g},isInterceptionRouteAppPath:function(){return f}});let d=c(737),e=["(..)(..)","(.)","(..)","(...)"];function f(a){return void 0!==a.split("/").find(a=>e.find(b=>a.startsWith(b)))}function g(a){let b,c,f;for(let d of a.split("/"))if(c=e.find(a=>d.startsWith(a))){[b,f]=a.split(c,2);break}if(!b||!c||!f)throw Object.defineProperty(Error("Invalid interception route: "+a+". Must be in the format //(..|...|..)(..)/"),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(b=(0,d.normalizeAppPath)(b),c){case"(.)":f="/"===b?"/"+f:b+"/"+f;break;case"(..)":if("/"===b)throw Object.defineProperty(Error("Invalid interception route: "+a+". Cannot use (..) marker at the root level, use (.) instead."),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});f=b.split("/").slice(0,-1).concat(f).join("/");break;case"(...)":f="/"+f;break;case"(..)(..)":let g=b.split("/");if(g.length<=2)throw Object.defineProperty(Error("Invalid interception route: "+a+". Cannot use (..)(..) marker at the root level or one level up."),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});f=g.slice(0,-2).concat(f).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:b,interceptedRoute:f}}},6962:a=>{(()=>{"use strict";var b={491:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ContextAPI=void 0;let d=c(223),e=c(172),f=c(930),g="context",h=new d.NoopContextManager;class i{constructor(){}static getInstance(){return this._instance||(this._instance=new i),this._instance}setGlobalContextManager(a){return(0,e.registerGlobal)(g,a,f.DiagAPI.instance())}active(){return this._getContextManager().active()}with(a,b,c,...d){return this._getContextManager().with(a,b,c,...d)}bind(a,b){return this._getContextManager().bind(a,b)}_getContextManager(){return(0,e.getGlobal)(g)||h}disable(){this._getContextManager().disable(),(0,e.unregisterGlobal)(g,f.DiagAPI.instance())}}b.ContextAPI=i},930:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagAPI=void 0;let d=c(56),e=c(912),f=c(957),g=c(172);class h{constructor(){function a(a){return function(...b){let c=(0,g.getGlobal)("diag");if(c)return c[a](...b)}}let b=this;b.setLogger=(a,c={logLevel:f.DiagLogLevel.INFO})=>{var d,h,i;if(a===b){let a=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return b.error(null!=(d=a.stack)?d:a.message),!1}"number"==typeof c&&(c={logLevel:c});let j=(0,g.getGlobal)("diag"),k=(0,e.createLogLevelDiagLogger)(null!=(h=c.logLevel)?h:f.DiagLogLevel.INFO,a);if(j&&!c.suppressOverrideMessage){let a=null!=(i=Error().stack)?i:"";j.warn(`Current logger will be overwritten from ${a}`),k.warn(`Current logger will overwrite one already registered from ${a}`)}return(0,g.registerGlobal)("diag",k,b,!0)},b.disable=()=>{(0,g.unregisterGlobal)("diag",b)},b.createComponentLogger=a=>new d.DiagComponentLogger(a),b.verbose=a("verbose"),b.debug=a("debug"),b.info=a("info"),b.warn=a("warn"),b.error=a("error")}static instance(){return this._instance||(this._instance=new h),this._instance}}b.DiagAPI=h},653:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.MetricsAPI=void 0;let d=c(660),e=c(172),f=c(930),g="metrics";class h{constructor(){}static getInstance(){return this._instance||(this._instance=new h),this._instance}setGlobalMeterProvider(a){return(0,e.registerGlobal)(g,a,f.DiagAPI.instance())}getMeterProvider(){return(0,e.getGlobal)(g)||d.NOOP_METER_PROVIDER}getMeter(a,b,c){return this.getMeterProvider().getMeter(a,b,c)}disable(){(0,e.unregisterGlobal)(g,f.DiagAPI.instance())}}b.MetricsAPI=h},181:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.PropagationAPI=void 0;let d=c(172),e=c(874),f=c(194),g=c(277),h=c(369),i=c(930),j="propagation",k=new e.NoopTextMapPropagator;class l{constructor(){this.createBaggage=h.createBaggage,this.getBaggage=g.getBaggage,this.getActiveBaggage=g.getActiveBaggage,this.setBaggage=g.setBaggage,this.deleteBaggage=g.deleteBaggage}static getInstance(){return this._instance||(this._instance=new l),this._instance}setGlobalPropagator(a){return(0,d.registerGlobal)(j,a,i.DiagAPI.instance())}inject(a,b,c=f.defaultTextMapSetter){return this._getGlobalPropagator().inject(a,b,c)}extract(a,b,c=f.defaultTextMapGetter){return this._getGlobalPropagator().extract(a,b,c)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,d.unregisterGlobal)(j,i.DiagAPI.instance())}_getGlobalPropagator(){return(0,d.getGlobal)(j)||k}}b.PropagationAPI=l},997:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TraceAPI=void 0;let d=c(172),e=c(846),f=c(139),g=c(607),h=c(930),i="trace";class j{constructor(){this._proxyTracerProvider=new e.ProxyTracerProvider,this.wrapSpanContext=f.wrapSpanContext,this.isSpanContextValid=f.isSpanContextValid,this.deleteSpan=g.deleteSpan,this.getSpan=g.getSpan,this.getActiveSpan=g.getActiveSpan,this.getSpanContext=g.getSpanContext,this.setSpan=g.setSpan,this.setSpanContext=g.setSpanContext}static getInstance(){return this._instance||(this._instance=new j),this._instance}setGlobalTracerProvider(a){let b=(0,d.registerGlobal)(i,this._proxyTracerProvider,h.DiagAPI.instance());return b&&this._proxyTracerProvider.setDelegate(a),b}getTracerProvider(){return(0,d.getGlobal)(i)||this._proxyTracerProvider}getTracer(a,b){return this.getTracerProvider().getTracer(a,b)}disable(){(0,d.unregisterGlobal)(i,h.DiagAPI.instance()),this._proxyTracerProvider=new e.ProxyTracerProvider}}b.TraceAPI=j},277:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.deleteBaggage=b.setBaggage=b.getActiveBaggage=b.getBaggage=void 0;let d=c(491),e=(0,c(780).createContextKey)("OpenTelemetry Baggage Key");function f(a){return a.getValue(e)||void 0}b.getBaggage=f,b.getActiveBaggage=function(){return f(d.ContextAPI.getInstance().active())},b.setBaggage=function(a,b){return a.setValue(e,b)},b.deleteBaggage=function(a){return a.deleteValue(e)}},993:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.BaggageImpl=void 0;class c{constructor(a){this._entries=a?new Map(a):new Map}getEntry(a){let b=this._entries.get(a);if(b)return Object.assign({},b)}getAllEntries(){return Array.from(this._entries.entries()).map(([a,b])=>[a,b])}setEntry(a,b){let d=new c(this._entries);return d._entries.set(a,b),d}removeEntry(a){let b=new c(this._entries);return b._entries.delete(a),b}removeEntries(...a){let b=new c(this._entries);for(let c of a)b._entries.delete(c);return b}clear(){return new c}}b.BaggageImpl=c},830:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.baggageEntryMetadataSymbol=void 0,b.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.baggageEntryMetadataFromString=b.createBaggage=void 0;let d=c(930),e=c(993),f=c(830),g=d.DiagAPI.instance();b.createBaggage=function(a={}){return new e.BaggageImpl(new Map(Object.entries(a)))},b.baggageEntryMetadataFromString=function(a){return"string"!=typeof a&&(g.error(`Cannot create baggage metadata from unknown type: ${typeof a}`),a=""),{__TYPE__:f.baggageEntryMetadataSymbol,toString:()=>a}}},67:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.context=void 0,b.context=c(491).ContextAPI.getInstance()},223:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopContextManager=void 0;let d=c(780);class e{active(){return d.ROOT_CONTEXT}with(a,b,c,...d){return b.call(c,...d)}bind(a,b){return b}enable(){return this}disable(){return this}}b.NoopContextManager=e},780:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ROOT_CONTEXT=b.createContextKey=void 0,b.createContextKey=function(a){return Symbol.for(a)};class c{constructor(a){let b=this;b._currentContext=a?new Map(a):new Map,b.getValue=a=>b._currentContext.get(a),b.setValue=(a,d)=>{let e=new c(b._currentContext);return e._currentContext.set(a,d),e},b.deleteValue=a=>{let d=new c(b._currentContext);return d._currentContext.delete(a),d}}}b.ROOT_CONTEXT=new c},506:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.diag=void 0,b.diag=c(930).DiagAPI.instance()},56:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagComponentLogger=void 0;let d=c(172);class e{constructor(a){this._namespace=a.namespace||"DiagComponentLogger"}debug(...a){return f("debug",this._namespace,a)}error(...a){return f("error",this._namespace,a)}info(...a){return f("info",this._namespace,a)}warn(...a){return f("warn",this._namespace,a)}verbose(...a){return f("verbose",this._namespace,a)}}function f(a,b,c){let e=(0,d.getGlobal)("diag");if(e)return c.unshift(b),e[a](...c)}b.DiagComponentLogger=e},972:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagConsoleLogger=void 0;let c=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class d{constructor(){for(let a=0;a{Object.defineProperty(b,"__esModule",{value:!0}),b.createLogLevelDiagLogger=void 0;let d=c(957);b.createLogLevelDiagLogger=function(a,b){function c(c,d){let e=b[c];return"function"==typeof e&&a>=d?e.bind(b):function(){}}return ad.DiagLogLevel.ALL&&(a=d.DiagLogLevel.ALL),b=b||{},{error:c("error",d.DiagLogLevel.ERROR),warn:c("warn",d.DiagLogLevel.WARN),info:c("info",d.DiagLogLevel.INFO),debug:c("debug",d.DiagLogLevel.DEBUG),verbose:c("verbose",d.DiagLogLevel.VERBOSE)}}},957:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.DiagLogLevel=void 0,function(a){a[a.NONE=0]="NONE",a[a.ERROR=30]="ERROR",a[a.WARN=50]="WARN",a[a.INFO=60]="INFO",a[a.DEBUG=70]="DEBUG",a[a.VERBOSE=80]="VERBOSE",a[a.ALL=9999]="ALL"}(b.DiagLogLevel||(b.DiagLogLevel={}))},172:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.unregisterGlobal=b.getGlobal=b.registerGlobal=void 0;let d=c(200),e=c(521),f=c(130),g=e.VERSION.split(".")[0],h=Symbol.for(`opentelemetry.js.api.${g}`),i=d._globalThis;b.registerGlobal=function(a,b,c,d=!1){var f;let g=i[h]=null!=(f=i[h])?f:{version:e.VERSION};if(!d&&g[a]){let b=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${a}`);return c.error(b.stack||b.message),!1}if(g.version!==e.VERSION){let b=Error(`@opentelemetry/api: Registration of version v${g.version} for ${a} does not match previously registered API v${e.VERSION}`);return c.error(b.stack||b.message),!1}return g[a]=b,c.debug(`@opentelemetry/api: Registered a global for ${a} v${e.VERSION}.`),!0},b.getGlobal=function(a){var b,c;let d=null==(b=i[h])?void 0:b.version;if(d&&(0,f.isCompatible)(d))return null==(c=i[h])?void 0:c[a]},b.unregisterGlobal=function(a,b){b.debug(`@opentelemetry/api: Unregistering a global for ${a} v${e.VERSION}.`);let c=i[h];c&&delete c[a]}},130:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.isCompatible=b._makeCompatibilityCheck=void 0;let d=c(521),e=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function f(a){let b=new Set([a]),c=new Set,d=a.match(e);if(!d)return()=>!1;let f={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};if(null!=f.prerelease)return function(b){return b===a};function g(a){return c.add(a),!1}return function(a){if(b.has(a))return!0;if(c.has(a))return!1;let d=a.match(e);if(!d)return g(a);let h={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};if(null!=h.prerelease||f.major!==h.major)return g(a);if(0===f.major)return f.minor===h.minor&&f.patch<=h.patch?(b.add(a),!0):g(a);return f.minor<=h.minor?(b.add(a),!0):g(a)}}b._makeCompatibilityCheck=f,b.isCompatible=f(d.VERSION)},886:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.metrics=void 0,b.metrics=c(653).MetricsAPI.getInstance()},901:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ValueType=void 0,function(a){a[a.INT=0]="INT",a[a.DOUBLE=1]="DOUBLE"}(b.ValueType||(b.ValueType={}))},102:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.createNoopMeter=b.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=b.NOOP_OBSERVABLE_GAUGE_METRIC=b.NOOP_OBSERVABLE_COUNTER_METRIC=b.NOOP_UP_DOWN_COUNTER_METRIC=b.NOOP_HISTOGRAM_METRIC=b.NOOP_COUNTER_METRIC=b.NOOP_METER=b.NoopObservableUpDownCounterMetric=b.NoopObservableGaugeMetric=b.NoopObservableCounterMetric=b.NoopObservableMetric=b.NoopHistogramMetric=b.NoopUpDownCounterMetric=b.NoopCounterMetric=b.NoopMetric=b.NoopMeter=void 0;class c{constructor(){}createHistogram(a,c){return b.NOOP_HISTOGRAM_METRIC}createCounter(a,c){return b.NOOP_COUNTER_METRIC}createUpDownCounter(a,c){return b.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(a,c){return b.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(a,c){return b.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(a,c){return b.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(a,b){}removeBatchObservableCallback(a){}}b.NoopMeter=c;class d{}b.NoopMetric=d;class e extends d{add(a,b){}}b.NoopCounterMetric=e;class f extends d{add(a,b){}}b.NoopUpDownCounterMetric=f;class g extends d{record(a,b){}}b.NoopHistogramMetric=g;class h{addCallback(a){}removeCallback(a){}}b.NoopObservableMetric=h;class i extends h{}b.NoopObservableCounterMetric=i;class j extends h{}b.NoopObservableGaugeMetric=j;class k extends h{}b.NoopObservableUpDownCounterMetric=k,b.NOOP_METER=new c,b.NOOP_COUNTER_METRIC=new e,b.NOOP_HISTOGRAM_METRIC=new g,b.NOOP_UP_DOWN_COUNTER_METRIC=new f,b.NOOP_OBSERVABLE_COUNTER_METRIC=new i,b.NOOP_OBSERVABLE_GAUGE_METRIC=new j,b.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new k,b.createNoopMeter=function(){return b.NOOP_METER}},660:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NOOP_METER_PROVIDER=b.NoopMeterProvider=void 0;let d=c(102);class e{getMeter(a,b,c){return d.NOOP_METER}}b.NoopMeterProvider=e,b.NOOP_METER_PROVIDER=new e},200:function(a,b,c){var d=this&&this.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c),Object.defineProperty(a,d,{enumerable:!0,get:function(){return b[c]}})}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),e=this&&this.__exportStar||function(a,b){for(var c in a)"default"===c||Object.prototype.hasOwnProperty.call(b,c)||d(b,a,c)};Object.defineProperty(b,"__esModule",{value:!0}),e(c(46),b)},651:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b._globalThis=void 0,b._globalThis="object"==typeof globalThis?globalThis:global},46:function(a,b,c){var d=this&&this.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c),Object.defineProperty(a,d,{enumerable:!0,get:function(){return b[c]}})}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),e=this&&this.__exportStar||function(a,b){for(var c in a)"default"===c||Object.prototype.hasOwnProperty.call(b,c)||d(b,a,c)};Object.defineProperty(b,"__esModule",{value:!0}),e(c(651),b)},939:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.propagation=void 0,b.propagation=c(181).PropagationAPI.getInstance()},874:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopTextMapPropagator=void 0;class c{inject(a,b){}extract(a,b){return a}fields(){return[]}}b.NoopTextMapPropagator=c},194:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.defaultTextMapSetter=b.defaultTextMapGetter=void 0,b.defaultTextMapGetter={get(a,b){if(null!=a)return a[b]},keys:a=>null==a?[]:Object.keys(a)},b.defaultTextMapSetter={set(a,b,c){null!=a&&(a[b]=c)}}},845:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.trace=void 0,b.trace=c(997).TraceAPI.getInstance()},403:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NonRecordingSpan=void 0;let d=c(476);class e{constructor(a=d.INVALID_SPAN_CONTEXT){this._spanContext=a}spanContext(){return this._spanContext}setAttribute(a,b){return this}setAttributes(a){return this}addEvent(a,b){return this}setStatus(a){return this}updateName(a){return this}end(a){}isRecording(){return!1}recordException(a,b){}}b.NonRecordingSpan=e},614:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopTracer=void 0;let d=c(491),e=c(607),f=c(403),g=c(139),h=d.ContextAPI.getInstance();class i{startSpan(a,b,c=h.active()){var d;if(null==b?void 0:b.root)return new f.NonRecordingSpan;let i=c&&(0,e.getSpanContext)(c);return"object"==typeof(d=i)&&"string"==typeof d.spanId&&"string"==typeof d.traceId&&"number"==typeof d.traceFlags&&(0,g.isSpanContextValid)(i)?new f.NonRecordingSpan(i):new f.NonRecordingSpan}startActiveSpan(a,b,c,d){let f,g,i;if(arguments.length<2)return;2==arguments.length?i=b:3==arguments.length?(f=b,i=c):(f=b,g=c,i=d);let j=null!=g?g:h.active(),k=this.startSpan(a,f,j),l=(0,e.setSpan)(j,k);return h.with(l,i,void 0,k)}}b.NoopTracer=i},124:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.NoopTracerProvider=void 0;let d=c(614);class e{getTracer(a,b,c){return new d.NoopTracer}}b.NoopTracerProvider=e},125:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ProxyTracer=void 0;let d=new(c(614)).NoopTracer;class e{constructor(a,b,c,d){this._provider=a,this.name=b,this.version=c,this.options=d}startSpan(a,b,c){return this._getTracer().startSpan(a,b,c)}startActiveSpan(a,b,c,d){let e=this._getTracer();return Reflect.apply(e.startActiveSpan,e,arguments)}_getTracer(){if(this._delegate)return this._delegate;let a=this._provider.getDelegateTracer(this.name,this.version,this.options);return a?(this._delegate=a,this._delegate):d}}b.ProxyTracer=e},846:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.ProxyTracerProvider=void 0;let d=c(125),e=new(c(124)).NoopTracerProvider;class f{getTracer(a,b,c){var e;return null!=(e=this.getDelegateTracer(a,b,c))?e:new d.ProxyTracer(this,a,b,c)}getDelegate(){var a;return null!=(a=this._delegate)?a:e}setDelegate(a){this._delegate=a}getDelegateTracer(a,b,c){var d;return null==(d=this._delegate)?void 0:d.getTracer(a,b,c)}}b.ProxyTracerProvider=f},996:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.SamplingDecision=void 0,function(a){a[a.NOT_RECORD=0]="NOT_RECORD",a[a.RECORD=1]="RECORD",a[a.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(b.SamplingDecision||(b.SamplingDecision={}))},607:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.getSpanContext=b.setSpanContext=b.deleteSpan=b.setSpan=b.getActiveSpan=b.getSpan=void 0;let d=c(780),e=c(403),f=c(491),g=(0,d.createContextKey)("OpenTelemetry Context Key SPAN");function h(a){return a.getValue(g)||void 0}function i(a,b){return a.setValue(g,b)}b.getSpan=h,b.getActiveSpan=function(){return h(f.ContextAPI.getInstance().active())},b.setSpan=i,b.deleteSpan=function(a){return a.deleteValue(g)},b.setSpanContext=function(a,b){return i(a,new e.NonRecordingSpan(b))},b.getSpanContext=function(a){var b;return null==(b=h(a))?void 0:b.spanContext()}},325:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TraceStateImpl=void 0;let d=c(564);class e{constructor(a){this._internalState=new Map,a&&this._parse(a)}set(a,b){let c=this._clone();return c._internalState.has(a)&&c._internalState.delete(a),c._internalState.set(a,b),c}unset(a){let b=this._clone();return b._internalState.delete(a),b}get(a){return this._internalState.get(a)}serialize(){return this._keys().reduce((a,b)=>(a.push(b+"="+this.get(b)),a),[]).join(",")}_parse(a){!(a.length>512)&&(this._internalState=a.split(",").reverse().reduce((a,b)=>{let c=b.trim(),e=c.indexOf("=");if(-1!==e){let f=c.slice(0,e),g=c.slice(e+1,b.length);(0,d.validateKey)(f)&&(0,d.validateValue)(g)&&a.set(f,g)}return a},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let a=new e;return a._internalState=new Map(this._internalState),a}}b.TraceStateImpl=e},564:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.validateValue=b.validateKey=void 0;let c="[_0-9a-z-*/]",d=`[a-z]${c}{0,255}`,e=`[a-z0-9]${c}{0,240}@[a-z]${c}{0,13}`,f=RegExp(`^(?:${d}|${e})$`),g=/^[ -~]{0,255}[!-~]$/,h=/,|=/;b.validateKey=function(a){return f.test(a)},b.validateValue=function(a){return g.test(a)&&!h.test(a)}},98:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.createTraceState=void 0;let d=c(325);b.createTraceState=function(a){return new d.TraceStateImpl(a)}},476:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.INVALID_SPAN_CONTEXT=b.INVALID_TRACEID=b.INVALID_SPANID=void 0;let d=c(475);b.INVALID_SPANID="0000000000000000",b.INVALID_TRACEID="00000000000000000000000000000000",b.INVALID_SPAN_CONTEXT={traceId:b.INVALID_TRACEID,spanId:b.INVALID_SPANID,traceFlags:d.TraceFlags.NONE}},357:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.SpanKind=void 0,function(a){a[a.INTERNAL=0]="INTERNAL",a[a.SERVER=1]="SERVER",a[a.CLIENT=2]="CLIENT",a[a.PRODUCER=3]="PRODUCER",a[a.CONSUMER=4]="CONSUMER"}(b.SpanKind||(b.SpanKind={}))},139:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.wrapSpanContext=b.isSpanContextValid=b.isValidSpanId=b.isValidTraceId=void 0;let d=c(476),e=c(403),f=/^([0-9a-f]{32})$/i,g=/^[0-9a-f]{16}$/i;function h(a){return f.test(a)&&a!==d.INVALID_TRACEID}function i(a){return g.test(a)&&a!==d.INVALID_SPANID}b.isValidTraceId=h,b.isValidSpanId=i,b.isSpanContextValid=function(a){return h(a.traceId)&&i(a.spanId)},b.wrapSpanContext=function(a){return new e.NonRecordingSpan(a)}},847:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.SpanStatusCode=void 0,function(a){a[a.UNSET=0]="UNSET",a[a.OK=1]="OK",a[a.ERROR=2]="ERROR"}(b.SpanStatusCode||(b.SpanStatusCode={}))},475:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.TraceFlags=void 0,function(a){a[a.NONE=0]="NONE",a[a.SAMPLED=1]="SAMPLED"}(b.TraceFlags||(b.TraceFlags={}))},521:(a,b)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.VERSION=void 0,b.VERSION="1.6.0"}},c={};function d(a){var e=c[a];if(void 0!==e)return e.exports;var f=c[a]={exports:{}},g=!0;try{b[a].call(f.exports,f,f.exports,d),g=!1}finally{g&&delete c[a]}return f.exports}d.ab=__dirname+"/";var e={};(()=>{Object.defineProperty(e,"__esModule",{value:!0}),e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var a=d(369);Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return a.baggageEntryMetadataFromString}});var b=d(780);Object.defineProperty(e,"createContextKey",{enumerable:!0,get:function(){return b.createContextKey}}),Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:!0,get:function(){return b.ROOT_CONTEXT}});var c=d(972);Object.defineProperty(e,"DiagConsoleLogger",{enumerable:!0,get:function(){return c.DiagConsoleLogger}});var f=d(957);Object.defineProperty(e,"DiagLogLevel",{enumerable:!0,get:function(){return f.DiagLogLevel}});var g=d(102);Object.defineProperty(e,"createNoopMeter",{enumerable:!0,get:function(){return g.createNoopMeter}});var h=d(901);Object.defineProperty(e,"ValueType",{enumerable:!0,get:function(){return h.ValueType}});var i=d(194);Object.defineProperty(e,"defaultTextMapGetter",{enumerable:!0,get:function(){return i.defaultTextMapGetter}}),Object.defineProperty(e,"defaultTextMapSetter",{enumerable:!0,get:function(){return i.defaultTextMapSetter}});var j=d(125);Object.defineProperty(e,"ProxyTracer",{enumerable:!0,get:function(){return j.ProxyTracer}});var k=d(846);Object.defineProperty(e,"ProxyTracerProvider",{enumerable:!0,get:function(){return k.ProxyTracerProvider}});var l=d(996);Object.defineProperty(e,"SamplingDecision",{enumerable:!0,get:function(){return l.SamplingDecision}});var m=d(357);Object.defineProperty(e,"SpanKind",{enumerable:!0,get:function(){return m.SpanKind}});var n=d(847);Object.defineProperty(e,"SpanStatusCode",{enumerable:!0,get:function(){return n.SpanStatusCode}});var o=d(475);Object.defineProperty(e,"TraceFlags",{enumerable:!0,get:function(){return o.TraceFlags}});var p=d(98);Object.defineProperty(e,"createTraceState",{enumerable:!0,get:function(){return p.createTraceState}});var q=d(139);Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return q.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return q.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return q.isValidSpanId}});var r=d(476);Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return r.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return r.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return r.INVALID_SPAN_CONTEXT}});let s=d(67);Object.defineProperty(e,"context",{enumerable:!0,get:function(){return s.context}});let t=d(506);Object.defineProperty(e,"diag",{enumerable:!0,get:function(){return t.diag}});let u=d(886);Object.defineProperty(e,"metrics",{enumerable:!0,get:function(){return u.metrics}});let v=d(939);Object.defineProperty(e,"propagation",{enumerable:!0,get:function(){return v.propagation}});let w=d(845);Object.defineProperty(e,"trace",{enumerable:!0,get:function(){return w.trace}}),e.default={context:s.context,diag:t.diag,metrics:u.metrics,propagation:v.propagation,trace:w.trace}})(),a.exports=e})()},7020:(a,b)=>{"use strict";b._=function(a){return a&&a.__esModule?a:{default:a}}},7286:(a,b)=>{"use strict";function c(a){return"("===a[0]&&a.endsWith(")")}function d(a){return a.startsWith("@")&&"@children"!==a}function e(a,b){if(a.includes(f)){let a=JSON.stringify(b);return"{}"!==a?f+"?"+a:f}return a}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DEFAULT_SEGMENT_KEY:function(){return g},PAGE_SEGMENT_KEY:function(){return f},addSearchParamsIfPageSegment:function(){return e},isGroupSegment:function(){return c},isParallelRouteSegment:function(){return d}});let f="__PAGE__",g="__DEFAULT__"},7782:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{cleanAmpPath:function(){return f},debounce:function(){return g},isBlockedPage:function(){return e}});let d=c(1086);function e(a){return d.BLOCKED_PAGES.includes(a)}function f(a){return a.match(/\?amp=(y|yes|true|1)/)&&(a=a.replace(/\?amp=(y|yes|true|1)&?/,"?")),a.match(/&=(y|yes|true|1)/)&&(a=a.replace(/&=(y|yes|true|1)/,"")),a=a.replace(/\?$/,"")}function g(a,b,c=1/0){let d,e,f,h=0,i=0;function j(){let g=Date.now(),k=i+b-g;k<=0||h+c>=g?(d=void 0,a.apply(f,e)):d=setTimeout(j,k)}return function(...a){e=a,f=this,i=Date.now(),void 0===d&&(h=i,d=setTimeout(j,b))}}},8272:(a,b)=>{"use strict";function c(a,b){if(b)return a.filter(({key:a})=>b.includes(a))}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getTracedMetadata",{enumerable:!0,get:function(){return c}})},8893:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getPageFiles",{enumerable:!0,get:function(){return f}});let d=c(1749),e=c(202);function f(a,b){let c=(0,d.denormalizePagePath)((0,e.normalizePagePath)(b)),f=a.pages[c];return f||(console.warn(`Could not find files for ${c} in .next/build-manifest.json`),[])}},9590:(a,b)=>{"use strict";function c(a){return a.startsWith("/")?a:"/"+a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"ensureLeadingSlash",{enumerable:!0,get:function(){return c}})},9616:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{Head:function(){return v},Html:function(){return x},Main:function(){return y},NextScript:function(){return w},default:function(){return z}});let d=c(8732),e=function(a,b){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=n(b);if(c&&c.has(a))return c.get(a);var d={__proto__:null},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}(c(2015)),f=c(1086),g=c(8893),h=c(2337),i=function(a){return a&&a.__esModule?a:{default:a}}(c(1644)),j=c(92),k=c(5296),l=c(2410),m=c(8272);function n(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(n=function(a){return a?c:b})(a)}let o=new Set;function p(a,b,c){let d=(0,g.getPageFiles)(a,"/_app"),e=c?[]:(0,g.getPageFiles)(a,b);return{sharedFiles:d,pageFiles:e,allFiles:[...new Set([...d,...e])]}}function q(a,b){let{assetPrefix:c,buildManifest:e,assetQueryString:f,disableOptimizedLoading:g,crossOrigin:h}=a;return e.polyfillFiles.filter(a=>a.endsWith(".js")&&!a.endsWith(".module.js")).map(a=>(0,d.jsx)("script",{defer:!g,nonce:b.nonce,crossOrigin:b.crossOrigin||h,noModule:!0,src:`${c}/_next/${(0,k.encodeURIPath)(a)}${f}`},a))}function r({styles:a}){if(!a)return null;let b=Array.isArray(a)?a:[];if(a.props&&Array.isArray(a.props.children)){let c=a=>{var b,c;return null==a||null==(c=a.props)||null==(b=c.dangerouslySetInnerHTML)?void 0:b.__html};a.props.children.forEach(a=>{Array.isArray(a)?a.forEach(a=>c(a)&&b.push(a)):c(a)&&b.push(a)})}return(0,d.jsx)("style",{"amp-custom":"",dangerouslySetInnerHTML:{__html:b.map(a=>a.props.dangerouslySetInnerHTML.__html).join("").replace(/\/\*# sourceMappingURL=.*\*\//g,"").replace(/\/\*@ sourceURL=.*?\*\//g,"")}})}function s(a,b,c){let{dynamicImports:e,assetPrefix:f,isDevelopment:g,assetQueryString:h,disableOptimizedLoading:i,crossOrigin:j}=a;return e.map(a=>!a.endsWith(".js")||c.allFiles.includes(a)?null:(0,d.jsx)("script",{async:!g&&i,defer:!i,src:`${f}/_next/${(0,k.encodeURIPath)(a)}${h}`,nonce:b.nonce,crossOrigin:b.crossOrigin||j},a))}function t(a,b,c){var e;let{assetPrefix:f,buildManifest:g,isDevelopment:h,assetQueryString:i,disableOptimizedLoading:j,crossOrigin:l}=a;return[...c.allFiles.filter(a=>a.endsWith(".js")),...null==(e=g.lowPriorityFiles)?void 0:e.filter(a=>a.endsWith(".js"))].map(a=>(0,d.jsx)("script",{src:`${f}/_next/${(0,k.encodeURIPath)(a)}${i}`,nonce:b.nonce,async:!h&&j,defer:!j,crossOrigin:b.crossOrigin||l},a))}function u(a,b){let{scriptLoader:c,disableOptimizedLoading:f,crossOrigin:g}=a,h=function(a,b){let{assetPrefix:c,scriptLoader:f,crossOrigin:g,nextScriptWorkers:h}=a;if(!h)return null;try{let{partytownSnippet:a}=require("@builder.io/partytown/integration"),h=(Array.isArray(b.children)?b.children:[b.children]).find(a=>{var b,c;return!!a&&!!a.props&&(null==a||null==(c=a.props)||null==(b=c.dangerouslySetInnerHTML)?void 0:b.__html.length)&&"data-partytown-config"in a.props});return(0,d.jsxs)(d.Fragment,{children:[!h&&(0,d.jsx)("script",{"data-partytown-config":"",dangerouslySetInnerHTML:{__html:` + partytown = { + lib: "${c}/_next/static/~partytown/" + }; + `}}),(0,d.jsx)("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:a()}}),(f.worker||[]).map((a,c)=>{let{strategy:d,src:f,children:h,dangerouslySetInnerHTML:i,...j}=a,k={};if(f)k.src=f;else if(i&&i.__html)k.dangerouslySetInnerHTML={__html:i.__html};else if(h)k.dangerouslySetInnerHTML={__html:"string"==typeof h?h:Array.isArray(h)?h.join(""):""};else throw Object.defineProperty(Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script"),"__NEXT_ERROR_CODE",{value:"E82",enumerable:!1,configurable:!0});return(0,e.createElement)("script",{...k,...j,type:"text/partytown",key:f||c,nonce:b.nonce,"data-nscript":"worker",crossOrigin:b.crossOrigin||g})})]})}catch(a){return(0,i.default)(a)&&"MODULE_NOT_FOUND"!==a.code&&console.warn(`Warning: ${a.message}`),null}}(a,b),j=(c.beforeInteractive||[]).filter(a=>a.src).map((a,c)=>{let{strategy:d,...h}=a;return(0,e.createElement)("script",{...h,key:h.src||c,defer:h.defer??!f,nonce:h.nonce||b.nonce,"data-nscript":"beforeInteractive",crossOrigin:b.crossOrigin||g})});return(0,d.jsxs)(d.Fragment,{children:[h,j]})}class v extends e.default.Component{static #a=this.contextType=j.HtmlContext;getCssLinks(a){let{assetPrefix:b,assetQueryString:c,dynamicImports:e,dynamicCssManifest:f,crossOrigin:g,optimizeCss:h}=this.context,i=a.allFiles.filter(a=>a.endsWith(".css")),j=new Set(a.sharedFiles),l=new Set([]),m=Array.from(new Set(e.filter(a=>a.endsWith(".css"))));if(m.length){let a=new Set(i);l=new Set(m=m.filter(b=>!(a.has(b)||j.has(b)))),i.push(...m)}let n=[];return i.forEach(a=>{let e=j.has(a),i=l.has(a),m=f.has(a);h||n.push((0,d.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,as:"style",crossOrigin:this.props.crossOrigin||g},`${a}-preload`)),n.push((0,d.jsx)("link",{nonce:this.props.nonce,rel:"stylesheet",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,crossOrigin:this.props.crossOrigin||g,"data-n-g":i?void 0:e?"":void 0,"data-n-p":e||i||m?void 0:""},a))}),0===n.length?null:n}getPreloadDynamicChunks(){let{dynamicImports:a,assetPrefix:b,assetQueryString:c,crossOrigin:e}=this.context;return a.map(a=>a.endsWith(".js")?(0,d.jsx)("link",{rel:"preload",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||e},a):null).filter(Boolean)}getPreloadMainLinks(a){let{assetPrefix:b,assetQueryString:c,scriptLoader:e,crossOrigin:f}=this.context,g=a.allFiles.filter(a=>a.endsWith(".js"));return[...(e.beforeInteractive||[]).map(a=>(0,d.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:a.src,as:"script",crossOrigin:this.props.crossOrigin||f},a.src)),...g.map(a=>(0,d.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${b}/_next/${(0,k.encodeURIPath)(a)}${c}`,as:"script",crossOrigin:this.props.crossOrigin||f},a))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:a}=this.context,{nonce:b,crossOrigin:c}=this.props;return(a.beforeInteractive||[]).filter(a=>!a.src&&(a.dangerouslySetInnerHTML||a.children)).map((a,d)=>{let{strategy:f,children:g,dangerouslySetInnerHTML:h,src:i,...j}=a,k="";return h&&h.__html?k=h.__html:g&&(k="string"==typeof g?g:Array.isArray(g)?g.join(""):""),(0,e.createElement)("script",{...j,dangerouslySetInnerHTML:{__html:k},key:j.id||d,nonce:b,"data-nscript":"beforeInteractive",crossOrigin:c||void 0})})}getDynamicChunks(a){return s(this.context,this.props,a)}getPreNextScripts(){return u(this.context,this.props)}getScripts(a){return t(this.context,this.props,a)}getPolyfillScripts(){return q(this.context,this.props)}render(){let{styles:a,ampPath:b,inAmpMode:f,hybridAmp:g,canonicalBase:h,__NEXT_DATA__:i,dangerousAsPath:j,headTags:n,unstable_runtimeJS:o,unstable_JsPreload:q,disableOptimizedLoading:s,optimizeCss:t,assetPrefix:u,nextFontManifest:v}=this.context,w=!1===o,x=!1===q||!s;this.context.docComponentsRendered.Head=!0;let{head:y}=this.context,z=[],A=[];y&&(y.forEach(a=>{a&&"link"===a.type&&"preload"===a.props.rel&&"style"===a.props.as?this.context.strictNextHead?z.push(e.default.cloneElement(a,{"data-next-head":""})):z.push(a):a&&(this.context.strictNextHead?A.push(e.default.cloneElement(a,{"data-next-head":""})):A.push(a))}),y=z.concat(A));let B=e.default.Children.toArray(this.props.children).filter(Boolean),C=!1,D=!1;y=e.default.Children.map(y||[],a=>{if(!a)return a;let{type:b,props:c}=a;if(f){let d="";if("meta"===b&&"viewport"===c.name?d='name="viewport"':"link"===b&&"canonical"===c.rel?D=!0:"script"===b&&(c.src&&-1>c.src.indexOf("ampproject")||c.dangerouslySetInnerHTML&&(!c.type||"text/javascript"===c.type))&&(d="{d+=` ${a}="${c[a]}"`}),d+="/>"),d)return console.warn(`Found conflicting amp tag "${a.type}" with conflicting prop ${d} in ${i.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`),null}else"link"===b&&"amphtml"===c.rel&&(C=!0);return a});let E=p(this.context.buildManifest,this.context.__NEXT_DATA__.page,f),F=function(a,b,c=""){if(!a)return{preconnect:null,preload:null};let e=a.pages["/_app"],f=a.pages[b],g=Array.from(new Set([...e??[],...f??[]]));return{preconnect:0===g.length&&(e||f)?(0,d.jsx)("link",{"data-next-font":a.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:g?g.map(a=>{let b=/\.(woff|woff2|eot|ttf|otf)$/.exec(a)[1];return(0,d.jsx)("link",{rel:"preload",href:`${c}/_next/${(0,k.encodeURIPath)(a)}`,as:"font",type:`font/${b}`,crossOrigin:"anonymous","data-next-font":a.includes("-s")?"size-adjust":""},a)}):null}}(v,j,u),G=((0,m.getTracedMetadata)((0,l.getTracer)().getTracePropagationData(),this.context.experimentalClientTraceMetadata)||[]).map(({key:a,value:b},c)=>(0,d.jsx)("meta",{name:a,content:b},`next-trace-data-${c}`));return(0,d.jsxs)("head",{...function(a){let{crossOrigin:b,nonce:c,...d}=a;return d}(this.props),children:[this.context.isDevelopment&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{"data-next-hide-fouc":!0,"data-ampdevmode":f?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),(0,d.jsx)("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":f?"true":void 0,children:(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}})})]}),y,this.context.strictNextHead?null:(0,d.jsx)("meta",{name:"next-head-count",content:e.default.Children.count(y||[]).toString()}),B,F.preconnect,F.preload,f&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!D&&(0,d.jsx)("link",{rel:"canonical",href:h+c(7782).cleanAmpPath(j)}),(0,d.jsx)("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),(0,d.jsx)(r,{styles:a}),(0,d.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),(0,d.jsx)("noscript",{children:(0,d.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})}),(0,d.jsx)("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})]}),!f&&(0,d.jsxs)(d.Fragment,{children:[!C&&g&&(0,d.jsx)("link",{rel:"amphtml",href:h+(b||`${j}${j.includes("?")?"&":"?"}amp=1`)}),this.getBeforeInteractiveInlineScripts(),!t&&this.getCssLinks(E),!t&&(0,d.jsx)("noscript",{"data-n-css":this.props.nonce??""}),!w&&!x&&this.getPreloadDynamicChunks(),!w&&!x&&this.getPreloadMainLinks(E),!s&&!w&&this.getPolyfillScripts(),!s&&!w&&this.getPreNextScripts(),!s&&!w&&this.getDynamicChunks(E),!s&&!w&&this.getScripts(E),t&&this.getCssLinks(E),t&&(0,d.jsx)("noscript",{"data-n-css":this.props.nonce??""}),this.context.isDevelopment&&(0,d.jsx)("noscript",{id:"__next_css__DO_NOT_USE__"}),G,a||null]}),e.default.createElement(e.default.Fragment,{},...n||[])]})}}class w extends e.default.Component{static #a=this.contextType=j.HtmlContext;getDynamicChunks(a){return s(this.context,this.props,a)}getPreNextScripts(){return u(this.context,this.props)}getScripts(a){return t(this.context,this.props,a)}getPolyfillScripts(){return q(this.context,this.props)}static getInlineScriptSource(a){let{__NEXT_DATA__:b,largePageDataBytes:d}=a;try{let e=JSON.stringify(b);if(o.has(b.page))return(0,h.htmlEscapeJsonString)(e);let f=Buffer.from(e).byteLength,g=c(3135).A;return d&&f>d&&(o.add(b.page),console.warn(`Warning: data for page "${b.page}"${b.page===a.dangerousAsPath?"":` (path "${a.dangerousAsPath}")`} is ${g(f)} which exceeds the threshold of ${g(d)}, this amount of data can reduce performance. +See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,h.htmlEscapeJsonString)(e)}catch(a){if((0,i.default)(a)&&-1!==a.message.indexOf("circular structure"))throw Object.defineProperty(Error(`Circular structure in "getInitialProps" result of page "${b.page}". https://nextjs.org/docs/messages/circular-structure`),"__NEXT_ERROR_CODE",{value:"E490",enumerable:!1,configurable:!0});throw a}}render(){let{assetPrefix:a,inAmpMode:b,buildManifest:c,unstable_runtimeJS:e,docComponentsRendered:f,assetQueryString:g,disableOptimizedLoading:h,crossOrigin:i}=this.context,j=!1===e;if(f.NextScript=!0,b)return null;let l=p(this.context.buildManifest,this.context.__NEXT_DATA__.page,b);return(0,d.jsxs)(d.Fragment,{children:[!j&&c.devFiles?c.devFiles.map(b=>(0,d.jsx)("script",{src:`${a}/_next/${(0,k.encodeURIPath)(b)}${g}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i},b)):null,j?null:(0,d.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i,dangerouslySetInnerHTML:{__html:w.getInlineScriptSource(this.context)}}),h&&!j&&this.getPolyfillScripts(),h&&!j&&this.getPreNextScripts(),h&&!j&&this.getDynamicChunks(l),h&&!j&&this.getScripts(l)]})}}function x(a){let{inAmpMode:b,docComponentsRendered:c,locale:f,scriptLoader:g,__NEXT_DATA__:h}=(0,j.useHtmlContext)();return c.Html=!0,!function(a,b,c){var d,f,g,h;if(!c.children)return;let i=[],j=Array.isArray(c.children)?c.children:[c.children],k=null==(f=j.find(a=>a.type===v))||null==(d=f.props)?void 0:d.children,l=null==(h=j.find(a=>"body"===a.type))||null==(g=h.props)?void 0:g.children,m=[...Array.isArray(k)?k:[k],...Array.isArray(l)?l:[l]];e.default.Children.forEach(m,b=>{var c;if(b&&(null==(c=b.type)?void 0:c.__nextScript)){if("beforeInteractive"===b.props.strategy){a.beforeInteractive=(a.beforeInteractive||[]).concat([{...b.props}]);return}else if(["lazyOnload","afterInteractive","worker"].includes(b.props.strategy))return void i.push(b.props);else if(void 0===b.props.strategy)return void i.push({...b.props,strategy:"afterInteractive"})}}),b.scriptLoader=i}(g,h,a),(0,d.jsx)("html",{...a,lang:a.lang||f||void 0,amp:b?"":void 0,"data-ampdevmode":void 0})}function y(){let{docComponentsRendered:a}=(0,j.useHtmlContext)();return a.Main=!0,(0,d.jsx)("next-js-internal-body-render-target",{})}class z extends e.default.Component{static getInitialProps(a){return a.defaultGetInitialProps(a)}render(){return(0,d.jsxs)(x,{children:[(0,d.jsx)(v,{nonce:this.props.nonce}),(0,d.jsxs)("body",{children:[(0,d.jsx)(y,{}),(0,d.jsx)(w,{nonce:this.props.nonce})]})]})}}z[f.NEXT_BUILTIN_DOCUMENT]=function(){return(0,d.jsxs)(x,{children:[(0,d.jsx)(v,{}),(0,d.jsxs)("body",{children:[(0,d.jsx)(y,{}),(0,d.jsx)(w,{})]})]})}}}; \ No newline at end of file diff --git a/.next/server/chunks/64.js b/.next/server/chunks/64.js new file mode 100644 index 0000000..55e8c69 --- /dev/null +++ b/.next/server/chunks/64.js @@ -0,0 +1,19 @@ +exports.id=64,exports.ids=[64],exports.modules={12:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{allowedStatusCodes:function(){return e},getRedirectStatus:function(){return f},modifyRouteRegex:function(){return g}});let d=c(5735),e=new Set([301,302,303,307,308]);function f(a){return a.statusCode||(a.permanent?d.RedirectStatusCode.PermanentRedirect:d.RedirectStatusCode.TemporaryRedirect)}function g(a,b){return b&&(a=a.replace(/\^/,`^(?!${b.map(a=>a.replace(/\//g,"\\/")).join("|")})`)),a=a.replace(/\$$/,"(?:\\/)?$")}},20:a=>{(()=>{"use strict";var b={695:a=>{var b=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function c(a){var b=a&&Date.parse(a);return"number"==typeof b?b:NaN}a.exports=function(a,d){var e=a["if-modified-since"],f=a["if-none-match"];if(!e&&!f)return!1;var g=a["cache-control"];if(g&&b.test(g))return!1;if(f&&"*"!==f){var h=d.etag;if(!h)return!1;for(var i=!0,j=function(a){for(var b=0,c=[],d=0,e=0,f=a.length;e{"use strict";function c(a,b,c){if(a)for(let f of(c&&(c=c.toLowerCase()),a)){var d,e;if(b===(null==(d=f.domain)?void 0:d.split(":",1)[0].toLowerCase())||c===f.defaultLocale.toLowerCase()||(null==(e=f.locales)?void 0:e.some(a=>a.toLowerCase()===c)))return f}}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"detectDomainLocale",{enumerable:!0,get:function(){return c}})},237:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"RouteKind",{enumerable:!0,get:function(){return c}});var c=function(a){return a.PAGES="PAGES",a.PAGES_API="PAGES_API",a.APP_PAGE="APP_PAGE",a.APP_ROUTE="APP_ROUTE",a.IMAGE="IMAGE",a}({})},996:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{chainStreams:function(){return n},continueDynamicHTMLResume:function(){return E},continueDynamicPrerender:function(){return C},continueFizzStream:function(){return B},continueStaticPrerender:function(){return D},createBufferedTransformStream:function(){return s},createDocumentClosingStream:function(){return F},createRootLayoutValidatorStream:function(){return A},renderToInitialFizzStream:function(){return u},streamFromBuffer:function(){return p},streamFromString:function(){return o},streamToBuffer:function(){return q},streamToString:function(){return r}});let d=c(2410),e=c(772),f=c(3367),g=c(1504),h=c(4346),i=c(2329),j=c(9248),k=c(9614);function l(){}let m=new TextEncoder;function n(...a){if(0===a.length)throw Object.defineProperty(Error("Invariant: chainStreams requires at least one stream"),"__NEXT_ERROR_CODE",{value:"E437",enumerable:!1,configurable:!0});if(1===a.length)return a[0];let{readable:b,writable:c}=new TransformStream,d=a[0].pipeTo(c,{preventClose:!0}),e=1;for(;eb.pipeTo(c,{preventClose:!0}))}let f=a[e];return(d=d.then(()=>f.pipeTo(c))).catch(l),b}function o(a){return new ReadableStream({start(b){b.enqueue(m.encode(a)),b.close()}})}function p(a){return new ReadableStream({start(b){b.enqueue(a),b.close()}})}async function q(a){let b=a.getReader(),c=[];for(;;){let{done:a,value:d}=await b.read();if(a)break;c.push(d)}return Buffer.concat(c)}async function r(a,b){let c=new TextDecoder("utf-8",{fatal:!0}),d="";for await(let e of a){if(null==b?void 0:b.aborted)return d;d+=c.decode(e,{stream:!0})}return d+c.decode()}function s(){let a,b=[],c=0;return new TransformStream({transform(d,e){b.push(d),c+=d.byteLength,(d=>{if(a)return;let e=new f.DetachedPromise;a=e,(0,g.scheduleImmediate)(()=>{try{let a=new Uint8Array(c),e=0;for(let c=0;ca.renderToReadableStream(b,c))}function v(a){let b=-1,c=!1;return new TransformStream({async transform(d,e){let f=-1,g=-1;if(b++,c)return void e.enqueue(d);let j=0;if(-1===f){if(-1===(f=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.META.ICON_MARK)))return void e.enqueue(d);47===d[f+(j=h.ENCODED_TAGS.META.ICON_MARK.length)]?j+=2:j++}if(0===b){if(g=(0,i.indexOfUint8Array)(d,h.ENCODED_TAGS.CLOSED.HEAD),-1!==f){if(f-1){if(a=!0,b.length===h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length)return;let e=b.slice(0,d);if(c.enqueue(e),b.length>h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length+d){let a=b.slice(d+h.ENCODED_TAGS.CLOSED.BODY_AND_HTML.length);c.enqueue(a)}}else c.enqueue(b)},flush(a){a.enqueue(h.ENCODED_TAGS.CLOSED.BODY_AND_HTML)}})}function A(){let a=!1,b=!1;return new TransformStream({async transform(c,d){!a&&(0,i.indexOfUint8Array)(c,h.ENCODED_TAGS.OPENING.HTML)>-1&&(a=!0),!b&&(0,i.indexOfUint8Array)(c,h.ENCODED_TAGS.OPENING.BODY)>-1&&(b=!0),d.enqueue(c)},flush(c){let d=[];a||d.push("html"),b||d.push("body"),d.length&&c.enqueue(m.encode(` + + `))}})}async function B(a,{suffix:b,inlinedDataStream:c,isStaticGeneration:d,isBuildTimePrerendering:e,buildId:h,getServerInsertedHTML:i,getServerInsertedMetadata:j,validateRootLayout:k}){let l,n,o=b?b.split(y,1)[0]:null;d&&"allReady"in a&&await a.allReady;var p=[s(),t(e,h),v(j),null!=o&&o.length>0?(n=!1,new TransformStream({transform(a,b){if(b.enqueue(a),!n){n=!0;let a=new f.DetachedPromise;l=a,(0,g.scheduleImmediate)(()=>{try{b.enqueue(m.encode(o))}catch{}finally{l=void 0,a.resolve()}})}},flush(a){if(l)return l.promise;n||a.enqueue(m.encode(o))}})):null,c?x(c):null,k?A():null,z(),w(i)];let q=a;for(let a of p)a&&(q=q.pipeThrough(a));return q}async function C(a,{getServerInsertedHTML:b,getServerInsertedMetadata:c}){return a.pipeThrough(s()).pipeThrough(new TransformStream({transform(a,b){(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.BODY_AND_HTML)||(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.BODY)||(0,i.isEquivalentUint8Arrays)(a,h.ENCODED_TAGS.CLOSED.HTML)||(a=(0,i.removeFromUint8Array)(a,h.ENCODED_TAGS.CLOSED.BODY),a=(0,i.removeFromUint8Array)(a,h.ENCODED_TAGS.CLOSED.HTML),b.enqueue(a))}})).pipeThrough(w(b)).pipeThrough(v(c))}async function D(a,{inlinedDataStream:b,getServerInsertedHTML:c,getServerInsertedMetadata:d,isBuildTimePrerendering:e,buildId:f}){return a.pipeThrough(s()).pipeThrough(t(e,f)).pipeThrough(w(c)).pipeThrough(v(d)).pipeThrough(x(b)).pipeThrough(z())}async function E(a,{inlinedDataStream:b,getServerInsertedHTML:c,getServerInsertedMetadata:d}){return a.pipeThrough(s()).pipeThrough(w(c)).pipeThrough(v(d)).pipeThrough(x(b)).pipeThrough(z())}function F(){return o(y)}},1413:(a,b)=>{"use strict";Object.defineProperty(b,"M",{enumerable:!0,get:function(){return function a(b,c){return c in b?b[c]:"then"in b&&"function"==typeof b.then?b.then(b=>a(b,c)):"function"==typeof b&&"default"===c?b:void 0}}})},1504:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{atLeastOneTask:function(){return e},scheduleImmediate:function(){return d},scheduleOnNextTick:function(){return c},waitAtLeastOneReactRenderTask:function(){return f}});let c=a=>{Promise.resolve().then(()=>{process.nextTick(a)})},d=a=>{setImmediate(a)};function e(){return new Promise(a=>d(a))}function f(){return new Promise(a=>setImmediate(a))}},1509:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{CachedRouteKind:function(){return c},IncrementalCacheKind:function(){return d}});var c=function(a){return a.APP_PAGE="APP_PAGE",a.APP_ROUTE="APP_ROUTE",a.PAGES="PAGES",a.FETCH="FETCH",a.REDIRECT="REDIRECT",a.IMAGE="IMAGE",a}({}),d=function(a){return a.APP_PAGE="APP_PAGE",a.APP_ROUTE="APP_ROUTE",a.PAGES="PAGES",a.FETCH="FETCH",a.IMAGE="IMAGE",a}({})},1730:(a,b)=>{"use strict";function c(a){return a.replace(/\/$/,"")||"/"}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"removeTrailingSlash",{enumerable:!0,get:function(){return c}})},1801:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{INTERNALS:function(){return h},NextRequest:function(){return i}});let d=c(2569),e=c(9833),f=c(8176),g=c(6347),h=Symbol("internal request");class i extends Request{constructor(a,b={}){let c="string"!=typeof a&&"url"in a?a.url:String(a);(0,e.validateURL)(c),b.body&&"half"!==b.duplex&&(b.duplex="half"),a instanceof Request?super(a,b):super(c,b);let f=new d.NextURL(c,{headers:(0,e.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:b.nextConfig});this[h]={cookies:new g.RequestCookies(this.headers),nextUrl:f,url:f.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[h].cookies}get nextUrl(){return this[h].nextUrl}get page(){throw new f.RemovedPageError}get ua(){throw new f.RemovedUAError}get url(){return this[h].url}}},1833:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addLocale",{enumerable:!0,get:function(){return f}});let d=c(6655),e=c(9596);function f(a,b,c,f){if(!b||b===c)return a;let g=a.toLowerCase();return!f&&((0,e.pathHasPrefix)(g,"/api")||(0,e.pathHasPrefix)(g,"/"+b.toLowerCase()))?a:(0,d.addPathPrefix)(a,"/"+b)}},2072:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return F},CACHE_ONE_YEAR:function(){return x},DOT_NEXT_ALIAS:function(){return D},ESLINT_DEFAULT_DIRS:function(){return Z},GSP_NO_RETURNED_VALUE:function(){return T},GSSP_COMPONENT_MEMBER_ERROR:function(){return W},GSSP_NO_RETURNED_VALUE:function(){return U},INFINITE_CACHE:function(){return y},INSTRUMENTATION_HOOK_FILENAME:function(){return B},MATCHED_PATH_HEADER:function(){return e},MIDDLEWARE_FILENAME:function(){return z},MIDDLEWARE_LOCATION_REGEXP:function(){return A},NEXT_BODY_SUFFIX:function(){return o},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return w},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return q},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return r},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return v},NEXT_CACHE_TAGS_HEADER:function(){return p},NEXT_CACHE_TAG_MAX_ITEMS:function(){return t},NEXT_CACHE_TAG_MAX_LENGTH:function(){return u},NEXT_DATA_SUFFIX:function(){return m},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return d},NEXT_META_SUFFIX:function(){return n},NEXT_QUERY_PARAM_PREFIX:function(){return c},NEXT_RESUME_HEADER:function(){return s},NON_STANDARD_NODE_ENV:function(){return X},PAGES_DIR_ALIAS:function(){return C},PRERENDER_REVALIDATE_HEADER:function(){return f},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return g},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return N},ROOT_DIR_ALIAS:function(){return E},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return M},RSC_ACTION_ENCRYPTION_ALIAS:function(){return L},RSC_ACTION_PROXY_ALIAS:function(){return I},RSC_ACTION_VALIDATE_ALIAS:function(){return H},RSC_CACHE_WRAPPER_ALIAS:function(){return J},RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS:function(){return K},RSC_MOD_REF_PROXY_ALIAS:function(){return G},RSC_PREFETCH_SUFFIX:function(){return h},RSC_SEGMENTS_DIR_SUFFIX:function(){return i},RSC_SEGMENT_SUFFIX:function(){return j},RSC_SUFFIX:function(){return k},SERVER_PROPS_EXPORT_ERROR:function(){return S},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return P},SERVER_PROPS_SSG_CONFLICT:function(){return Q},SERVER_RUNTIME:function(){return $},SSG_FALLBACK_EXPORT_ERROR:function(){return Y},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return O},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return R},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return V},WEBPACK_LAYERS:function(){return aa},WEBPACK_RESOURCE_QUERIES:function(){return ab}});let c="nxtP",d="nxtI",e="x-matched-path",f="x-prerender-revalidate",g="x-prerender-revalidate-if-generated",h=".prefetch.rsc",i=".segments",j=".segment.rsc",k=".rsc",l=".action",m=".json",n=".meta",o=".body",p="x-next-cache-tags",q="x-next-revalidated-tags",r="x-next-revalidate-tag-token",s="next-resume",t=128,u=256,v=1024,w="_N_T_",x=31536e3,y=0xfffffffe,z="middleware",A=`(?:src/)?${z}`,B="instrumentation",C="private-next-pages",D="private-dot-next",E="private-next-root-dir",F="private-next-app-dir",G="private-next-rsc-mod-ref-proxy",H="private-next-rsc-action-validate",I="private-next-rsc-server-reference",J="private-next-rsc-cache-wrapper",K="private-next-rsc-track-dynamic-import",L="private-next-rsc-action-encryption",M="private-next-rsc-action-client-wrapper",N="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",O="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",P="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",Q="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",R="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",S="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",T="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",U="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",V="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",W="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",X='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',Y="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",Z=["app","pages","components","lib","src"],$={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},_={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"},aa={..._,GROUP:{builtinReact:[_.reactServerComponents,_.actionBrowser],serverOnly:[_.reactServerComponents,_.actionBrowser,_.instrument,_.middleware],neutralTarget:[_.apiNode,_.apiEdge],clientOnly:[_.serverSideRendering,_.appPagesBrowser],bundled:[_.reactServerComponents,_.actionBrowser,_.serverSideRendering,_.appPagesBrowser,_.shared,_.instrument,_.middleware],appPages:[_.reactServerComponents,_.serverSideRendering,_.appPagesBrowser,_.actionBrowser]}},ab={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},2329:(a,b)=>{"use strict";function c(a,b){if(0===b.length)return 0;if(0===a.length||b.length>a.length)return -1;for(let c=0;c<=a.length-b.length;c++){let d=!0;for(let e=0;e-1))return a;{let c=new Uint8Array(a.length-b.length);return c.set(a.slice(0,d)),c.set(a.slice(d+b.length),d),c}}Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{indexOfUint8Array:function(){return c},isEquivalentUint8Arrays:function(){return d},removeFromUint8Array:function(){return e}})},2569:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"NextURL",{enumerable:!0,get:function(){return k}});let d=c(31),e=c(2620),f=c(2881),g=c(9705),h=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function i(a,b){return new URL(String(a).replace(h,"localhost"),b&&String(b).replace(h,"localhost"))}let j=Symbol("NextURLInternal");class k{constructor(a,b,c){let d,e;"object"==typeof b&&"pathname"in b||"string"==typeof b?(d=b,e=c||{}):e=c||b||{},this[j]={url:i(a,d??e.base),options:e,basePath:""},this.analyze()}analyze(){var a,b,c,e,h;let i=(0,g.getNextPathnameInfo)(this[j].url.pathname,{nextConfig:this[j].options.nextConfig,parseData:!0,i18nProvider:this[j].options.i18nProvider}),k=(0,f.getHostname)(this[j].url,this[j].options.headers);this[j].domainLocale=this[j].options.i18nProvider?this[j].options.i18nProvider.detectDomainLocale(k):(0,d.detectDomainLocale)(null==(b=this[j].options.nextConfig)||null==(a=b.i18n)?void 0:a.domains,k);let l=(null==(c=this[j].domainLocale)?void 0:c.defaultLocale)||(null==(h=this[j].options.nextConfig)||null==(e=h.i18n)?void 0:e.defaultLocale);this[j].url.pathname=i.pathname,this[j].defaultLocale=l,this[j].basePath=i.basePath??"",this[j].buildId=i.buildId,this[j].locale=i.locale??l,this[j].trailingSlash=i.trailingSlash}formatPathname(){return(0,e.formatNextPathnameInfo)({basePath:this[j].basePath,buildId:this[j].buildId,defaultLocale:this[j].options.forceLocale?void 0:this[j].defaultLocale,locale:this[j].locale,pathname:this[j].url.pathname,trailingSlash:this[j].trailingSlash})}formatSearch(){return this[j].url.search}get buildId(){return this[j].buildId}set buildId(a){this[j].buildId=a}get locale(){return this[j].locale??""}set locale(a){var b,c;if(!this[j].locale||!(null==(c=this[j].options.nextConfig)||null==(b=c.i18n)?void 0:b.locales.includes(a)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${a}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[j].locale=a}get defaultLocale(){return this[j].defaultLocale}get domainLocale(){return this[j].domainLocale}get searchParams(){return this[j].url.searchParams}get host(){return this[j].url.host}set host(a){this[j].url.host=a}get hostname(){return this[j].url.hostname}set hostname(a){this[j].url.hostname=a}get port(){return this[j].url.port}set port(a){this[j].url.port=a}get protocol(){return this[j].url.protocol}set protocol(a){this[j].url.protocol=a}get href(){let a=this.formatPathname(),b=this.formatSearch();return`${this.protocol}//${this.host}${a}${b}${this.hash}`}set href(a){this[j].url=i(a),this.analyze()}get origin(){return this[j].url.origin}get pathname(){return this[j].url.pathname}set pathname(a){this[j].url.pathname=a}get hash(){return this[j].url.hash}set hash(a){this[j].url.hash=a}get search(){return this[j].url.search}set search(a){this[j].url.search=a}get password(){return this[j].url.password}set password(a){this[j].url.password=a}get username(){return this[j].url.username}set username(a){this[j].url.username=a}get basePath(){return this[j].basePath}set basePath(a){this[j].basePath=a.startsWith("/")?a:`/${a}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new k(String(this),this[j].options)}}},2620:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"formatNextPathnameInfo",{enumerable:!0,get:function(){return h}});let d=c(1730),e=c(6655),f=c(8992),g=c(1833);function h(a){let b=(0,g.addLocale)(a.pathname,a.locale,a.buildId?void 0:a.defaultLocale,a.ignorePrefix);return(a.buildId||!a.trailingSlash)&&(b=(0,d.removeTrailingSlash)(b)),a.buildId&&(b=(0,f.addPathSuffix)((0,e.addPathPrefix)(b,"/_next/data/"+a.buildId),"/"===a.pathname?"index.json":".json")),b=(0,e.addPathPrefix)(b,a.basePath),!a.buildId&&a.trailingSlash?b.endsWith("/")?b:(0,f.addPathSuffix)(b,"/"):(0,d.removeTrailingSlash)(b)}},2746:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"normalizeLocalePath",{enumerable:!0,get:function(){return d}});let c=new WeakMap;function d(a,b){let d;if(!b)return{pathname:a};let e=c.get(b);e||(e=b.map(a=>a.toLowerCase()),c.set(b,e));let f=a.split("/",2);if(!f[1])return{pathname:a};let g=f[1].toLowerCase(),h=e.indexOf(g);return h<0?{pathname:a}:(d=b[h],{pathname:a=a.slice(d.length+1)||"/",detectedLocale:d})}},2881:(a,b)=>{"use strict";function c(a,b){let c;if((null==b?void 0:b.host)&&!Array.isArray(b.host))c=b.host.toString().split(":",1)[0];else{if(!a.hostname)return;c=a.hostname}return c.toLowerCase()}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getHostname",{enumerable:!0,get:function(){return c}})},2956:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{fnv1a52:function(){return c},generateETag:function(){return d}});let c=a=>{let b=a.length,c=0,d=0,e=8997,f=0,g=33826,h=0,i=40164,j=0,k=52210;for(;c>>16,e=65535&d,h+=f>>>16,g=65535&f,k=j+(h>>>16)&65535,i=65535&h;return(15&k)*0x1000000000000+0x100000000*i+65536*g+(e^k>>4)},d=(a,b=!1)=>(b?'W/"':'"')+c(a).toString(36)+a.length.toString(36)+'"'},3134:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{NextRequestAdapter:function(){return l},ResponseAborted:function(){return i},ResponseAbortedName:function(){return h},createAbortController:function(){return j},signalFromNodeResponse:function(){return k}});let d=c(5124),e=c(9833),f=c(1801),g=c(5131),h="ResponseAborted";class i extends Error{constructor(...a){super(...a),this.name=h}}function j(a){let b=new AbortController;return a.once("close",()=>{a.writableFinished||b.abort(new i)}),b}function k(a){let{errored:b,destroyed:c}=a;if(b||c)return AbortSignal.abort(b??new i);let{signal:d}=j(a);return d}class l{static fromBaseNextRequest(a,b){if((0,g.isNodeNextRequest)(a))return l.fromNodeNextRequest(a,b);throw Object.defineProperty(Error("Invariant: Unsupported NextRequest type"),"__NEXT_ERROR_CODE",{value:"E345",enumerable:!1,configurable:!0})}static fromNodeNextRequest(a,b){let c,g=null;if("GET"!==a.method&&"HEAD"!==a.method&&a.body&&(g=a.body),a.url.startsWith("http"))c=new URL(a.url);else{let b=(0,d.getRequestMeta)(a,"initURL");c=b&&b.startsWith("http")?new URL(a.url,b):new URL(a.url,"http://n")}return new f.NextRequest(c,{method:a.method,headers:(0,e.fromNodeOutgoingHttpHeaders)(a.headers),duplex:"half",signal:b,...b.aborted?{}:{body:g}})}static fromWebNextRequest(a){let b=null;return"GET"!==a.method&&"HEAD"!==a.method&&(b=a.body),new f.NextRequest(a.url,{method:a.method,headers:(0,e.fromNodeOutgoingHttpHeaders)(a.headers),duplex:"half",signal:a.request.signal,...a.request.signal.aborted?{}:{body:b}})}}},3367:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"DetachedPromise",{enumerable:!0,get:function(){return c}});class c{constructor(){let a,b;this.promise=new Promise((c,d)=>{a=c,b=d}),this.resolve=a,this.reject=b}}},3709:(a,b)=>{"use strict";function c(a){return a.isOnDemandRevalidate?"on-demand":a.isRevalidate?"stale":void 0}Object.defineProperty(b,"c",{enumerable:!0,get:function(){return c}})},4346:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"ENCODED_TAGS",{enumerable:!0,get:function(){return c}});let c={OPENING:{HTML:new Uint8Array([60,104,116,109,108]),BODY:new Uint8Array([60,98,111,100,121])},CLOSED:{HEAD:new Uint8Array([60,47,104,101,97,100,62]),BODY:new Uint8Array([60,47,98,111,100,121,62]),HTML:new Uint8Array([60,47,104,116,109,108,62]),BODY_AND_HTML:new Uint8Array([60,47,98,111,100,121,62,60,47,104,116,109,108,62])},META:{ICON_MARK:new Uint8Array([60,109,101,116,97,32,110,97,109,101,61,34,194,171,110,120,116,45,105,99,111,110,194,187,34])}}},4971:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}});let d=c(996),e=c(9264);class f{static fromStatic(a){return new f(a,{metadata:{}})}constructor(a,{contentType:b,waitUntil:c,metadata:d}){this.response=a,this.contentType=b,this.metadata=d,this.waitUntil=c}assignMetadata(a){Object.assign(this.metadata,a)}get isNull(){return null===this.response}get isDynamic(){return"string"!=typeof this.response}toUnchunkedBuffer(a=!1){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be unchunked"),"__NEXT_ERROR_CODE",{value:"E274",enumerable:!1,configurable:!0});if("string"!=typeof this.response){if(!a)throw Object.defineProperty(Error("Invariant: dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E81",enumerable:!1,configurable:!0});return(0,d.streamToBuffer)(this.readable)}return Buffer.from(this.response)}toUnchunkedString(a=!1){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be unchunked"),"__NEXT_ERROR_CODE",{value:"E274",enumerable:!1,configurable:!0});if("string"!=typeof this.response){if(!a)throw Object.defineProperty(Error("Invariant: dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E81",enumerable:!1,configurable:!0});return(0,d.streamToString)(this.readable)}return this.response}get readable(){if(null===this.response)throw Object.defineProperty(Error("Invariant: null responses cannot be streamed"),"__NEXT_ERROR_CODE",{value:"E14",enumerable:!1,configurable:!0});if("string"==typeof this.response)throw Object.defineProperty(Error("Invariant: static responses cannot be streamed"),"__NEXT_ERROR_CODE",{value:"E151",enumerable:!1,configurable:!0});return Buffer.isBuffer(this.response)?(0,d.streamFromBuffer)(this.response):Array.isArray(this.response)?(0,d.chainStreams)(...this.response):this.response}chain(a){let b;if(null===this.response)throw Object.defineProperty(Error("Invariant: response is null. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E258",enumerable:!1,configurable:!0});(b="string"==typeof this.response?[(0,d.streamFromString)(this.response)]:Array.isArray(this.response)?this.response:Buffer.isBuffer(this.response)?[(0,d.streamFromBuffer)(this.response)]:[this.response]).push(a),this.response=b}async pipeTo(a){try{await this.readable.pipeTo(a,{preventClose:!0}),this.waitUntil&&await this.waitUntil,await a.close()}catch(b){if((0,e.isAbortError)(b))return void await a.abort(b);throw b}}async pipeToNodeResponse(a){await (0,e.pipeToNodeResponse)(this.readable,a,this.waitUntil)}}},5080:a=>{"use strict";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,f={};function g(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function h(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function i(a){if(!a)return;let[[b,c],...d]=h(a),{domain:e,expires:f,httponly:g,maxage:i,path:l,samesite:m,secure:n,partitioned:o,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...m&&{sameSite:j.includes(q=(q=m).toLowerCase())?q:void 0},...n&&{secure:!0},...p&&{priority:k.includes(r=(r=p).toLowerCase())?r:void 0},...o&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}((a,c)=>{for(var d in c)b(a,d,{get:c[d],enumerable:!0})})(f,{RequestCookies:()=>l,ResponseCookies:()=>m,parseCookie:()=>h,parseSetCookie:()=>i,stringifyCookie:()=>g}),a.exports=((a,f,g,h)=>{if(f&&"object"==typeof f||"function"==typeof f)for(let g of d(f))e.call(a,g)||void 0===g||b(a,g,{get:()=>f[g],enumerable:!(h=c(f,g))||h.enumerable});return a})(b({},"__esModule",{value:!0}),f);var j=["strict","lax","none"],k=["low","medium","high"],l=class{constructor(a){this._parsed=new Map,this._headers=a;let b=a.get("cookie");if(b)for(let[a,c]of h(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>g(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>g(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},m=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;let e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(let a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){let b=i(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=g(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(g).join("; ")}}},5122:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return g}});let d=c(8538),e=c(1504),f=c(8737);!function(a,b){Object.keys(a).forEach(function(c){"default"===c||Object.prototype.hasOwnProperty.call(b,c)||Object.defineProperty(b,c,{enumerable:!0,get:function(){return a[c]}})})}(c(1509),b);class g{constructor(a){this.batcher=d.Batcher.create({cacheKeyFn:({key:a,isOnDemandRevalidate:b})=>`${a}-${b?"1":"0"}`,schedulerFn:e.scheduleOnNextTick}),this.minimal_mode=a}async get(a,b,c){if(!a)return b({hasResolved:!1,previousCacheEntry:null});let{incrementalCache:d,isOnDemandRevalidate:e=!1,isFallback:g=!1,isRoutePPREnabled:h=!1,waitUntil:i}=c,j=await this.batcher.batch({key:a,isOnDemandRevalidate:e},(j,k)=>{let l=(async()=>{var i;if(this.minimal_mode&&(null==(i=this.previousCacheItem)?void 0:i.key)===j&&this.previousCacheItem.expiresAt>Date.now())return this.previousCacheItem.entry;let l=(0,f.routeKindToIncrementalCacheKind)(c.routeKind),m=!1,n=null;try{if((n=this.minimal_mode?null:await d.get(a,{kind:l,isRoutePPREnabled:c.isRoutePPREnabled,isFallback:g}))&&!e&&(k(n),m=!0,!n.isStale||c.isPrefetch))return null;let i=await b({hasResolved:m,previousCacheEntry:n,isRevalidating:!0});if(!i)return this.minimal_mode&&(this.previousCacheItem=void 0),null;let o=await (0,f.fromResponseCacheEntry)({...i,isMiss:!n});if(!o)return this.minimal_mode&&(this.previousCacheItem=void 0),null;return e||m||(k(o),m=!0),o.cacheControl&&(this.minimal_mode?this.previousCacheItem={key:j,entry:o,expiresAt:Date.now()+1e3}:await d.set(a,o.value,{cacheControl:o.cacheControl,isRoutePPREnabled:h,isFallback:g})),o}catch(b){if(null==n?void 0:n.cacheControl){let b=Math.min(Math.max(n.cacheControl.revalidate||3,3),30),c=void 0===n.cacheControl.expire?void 0:Math.max(b+3,n.cacheControl.expire);await d.set(a,n.value,{cacheControl:{revalidate:b,expire:c},isRoutePPREnabled:h,isFallback:g})}if(m)return console.error(b),null;throw b}})();return i&&i(l),l});return(0,f.toResponseCacheEntry)(j)}}},5124:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{NEXT_REQUEST_META:function(){return c},addRequestMeta:function(){return f},getRequestMeta:function(){return d},removeRequestMeta:function(){return g},setRequestMeta:function(){return e}});let c=Symbol.for("NextInternalRequestMeta");function d(a,b){let d=a[c]||{};return"string"==typeof b?d[b]:d}function e(a,b){return a[c]=b,b}function f(a,b,c){let f=d(a);return f[b]=c,e(a,f)}function g(a,b){let c=d(a);return delete c[b],e(a,c)}},5131:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{isNodeNextRequest:function(){return e},isNodeNextResponse:function(){return f},isWebNextRequest:function(){return c},isWebNextResponse:function(){return d}});let c=a=>!1,d=a=>!1,e=a=>!0,f=a=>!0},5735:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"RedirectStatusCode",{enumerable:!0,get:function(){return c}});var c=function(a){return a[a.SeeOther=303]="SeeOther",a[a.TemporaryRedirect=307]="TemporaryRedirect",a[a.PermanentRedirect=308]="PermanentRedirect",a}({});("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},6290:(a,b)=>{"use strict";function c(a){let b=a.indexOf("#"),c=a.indexOf("?"),d=c>-1&&(b<0||c-1?{pathname:a.substring(0,d?c:b),query:d?a.substring(c,b>-1?b:void 0):"",hash:b>-1?a.slice(b):""}:{pathname:a,query:"",hash:""}}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"parsePath",{enumerable:!0,get:function(){return c}})},6347:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{RequestCookies:function(){return d.RequestCookies},ResponseCookies:function(){return d.ResponseCookies},stringifyCookie:function(){return d.stringifyCookie}});let d=c(5080)},6655:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addPathPrefix",{enumerable:!0,get:function(){return e}});let d=c(6290);function e(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:e,hash:f}=(0,d.parsePath)(a);return""+b+c+e+f}},6755:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getCacheControlHeader",{enumerable:!0,get:function(){return e}});let d=c(2072);function e({revalidate:a,expire:b}){let c="number"==typeof a&&void 0!==b&&a{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getClientComponentLoaderMetrics:function(){return g},wrapClientComponentLoader:function(){return f}});let c=0,d=0,e=0;function f(a){return"performance"in globalThis?{require:(...b)=>{let f=performance.now();0===c&&(c=f);try{return e+=1,a.__next_app__.require(...b)}finally{d+=performance.now()-f}},loadChunk:(...b)=>{let c=performance.now(),e=a.__next_app__.loadChunk(...b);return e.finally(()=>{d+=performance.now()-c}),e}}:a.__next_app__}function g(a={}){let b=0===c?void 0:{clientComponentLoadStart:c,clientComponentLoadTimes:d,clientComponentLoadCount:e};return a.reset&&(c=0,d=0,e=0),b}},8156:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"removePathPrefix",{enumerable:!0,get:function(){return e}});let d=c(9596);function e(a,b){if(!(0,d.pathHasPrefix)(a,b))return a;let c=a.slice(b.length);return c.startsWith("/")?c:"/"+c}},8164:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{sendEtagResponse:function(){return i},sendRenderResult:function(){return j}});let d=c(4718),e=c(2956),f=function(a){return a&&a.__esModule?a:{default:a}}(c(20)),g=c(6755),h=c(8456);function i(a,b,c){return c&&b.setHeader("ETag",c),!!(0,f.default)(a.headers,{etag:c})&&(b.statusCode=304,b.end(),!0)}async function j({req:a,res:b,result:c,type:f,generateEtags:j,poweredByHeader:k,cacheControl:l}){if((0,d.isResSent)(b))return;k&&"html"===f&&b.setHeader("X-Powered-By","Next.js"),l&&!b.getHeader("Cache-Control")&&b.setHeader("Cache-Control",(0,g.getCacheControlHeader)(l));let m=c.isDynamic?null:c.toUnchunkedString();if(!(j&&null!==m&&i(a,b,(0,e.generateETag)(m))))return(b.getHeader("Content-Type")||b.setHeader("Content-Type",c.contentType?c.contentType:"rsc"===f?h.RSC_CONTENT_TYPE_HEADER:"json"===f?"application/json":"text/html; charset=utf-8"),m&&b.setHeader("Content-Length",Buffer.byteLength(m)),"HEAD"===a.method)?void b.end(null):null!==m?void b.end(m):void await c.pipeToNodeResponse(b)}},8176:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{PageSignatureError:function(){return c},RemovedPageError:function(){return d},RemovedUAError:function(){return e}});class c extends Error{constructor({page:a}){super(`The middleware "${a}" accepts an async API directly with the form: + + export function middleware(request, event) { + return NextResponse.redirect('/new-location') + } + + Read more: https://nextjs.org/docs/messages/middleware-new-signature + `)}}class d extends Error{constructor(){super(`The request.page has been deprecated in favour of \`URLPattern\`. + Read more: https://nextjs.org/docs/messages/middleware-request-page + `)}}class e extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function. + Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent + `)}}},8456:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{ACTION_HEADER:function(){return d},FLIGHT_HEADERS:function(){return l},NEXT_ACTION_NOT_FOUND_HEADER:function(){return s},NEXT_DID_POSTPONE_HEADER:function(){return o},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return i},NEXT_HMR_REFRESH_HEADER:function(){return h},NEXT_IS_PRERENDER_HEADER:function(){return r},NEXT_REWRITTEN_PATH_HEADER:function(){return p},NEXT_REWRITTEN_QUERY_HEADER:function(){return q},NEXT_ROUTER_PREFETCH_HEADER:function(){return f},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return g},NEXT_ROUTER_STALE_TIME_HEADER:function(){return n},NEXT_ROUTER_STATE_TREE_HEADER:function(){return e},NEXT_RSC_UNION_QUERY:function(){return m},NEXT_URL:function(){return j},RSC_CONTENT_TYPE_HEADER:function(){return k},RSC_HEADER:function(){return c}});let c="RSC",d="Next-Action",e="Next-Router-State-Tree",f="Next-Router-Prefetch",g="Next-Router-Segment-Prefetch",h="Next-HMR-Refresh",i="__next_hmr_refresh_hash__",j="Next-Url",k="text/x-component",l=[c,e,f,h,g],m="_rsc",n="x-nextjs-stale-time",o="x-nextjs-postponed",p="x-nextjs-rewritten-path",q="x-nextjs-rewritten-query",r="x-nextjs-prerender",s="x-nextjs-action-not-found";("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},8538:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"Batcher",{enumerable:!0,get:function(){return e}});let d=c(3367);class e{constructor(a,b=a=>a()){this.cacheKeyFn=a,this.schedulerFn=b,this.pending=new Map}static create(a){return new e(null==a?void 0:a.cacheKeyFn,null==a?void 0:a.schedulerFn)}async batch(a,b){let c=this.cacheKeyFn?await this.cacheKeyFn(a):a;if(null===c)return b(c,Promise.resolve);let e=this.pending.get(c);if(e)return e;let{promise:f,resolve:g,reject:h}=new d.DetachedPromise;return this.pending.set(c,f),this.schedulerFn(async()=>{try{let a=await b(c,g);g(a)}catch(a){h(a)}finally{this.pending.delete(c)}}),f}}},8647:(a,b)=>{"use strict";function c(a){return a.default||a}Object.defineProperty(b,"T",{enumerable:!0,get:function(){return c}})},8737:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{fromResponseCacheEntry:function(){return g},routeKindToIncrementalCacheKind:function(){return i},toResponseCacheEntry:function(){return h}});let d=c(1509),e=function(a){return a&&a.__esModule?a:{default:a}}(c(4971)),f=c(237);async function g(a){var b,c;return{...a,value:(null==(b=a.value)?void 0:b.kind)===d.CachedRouteKind.PAGES?{kind:d.CachedRouteKind.PAGES,html:await a.value.html.toUnchunkedString(!0),pageData:a.value.pageData,headers:a.value.headers,status:a.value.status}:(null==(c=a.value)?void 0:c.kind)===d.CachedRouteKind.APP_PAGE?{kind:d.CachedRouteKind.APP_PAGE,html:await a.value.html.toUnchunkedString(!0),postponed:a.value.postponed,rscData:a.value.rscData,headers:a.value.headers,status:a.value.status,segmentData:a.value.segmentData}:a.value}}async function h(a){var b,c;return a?{isMiss:a.isMiss,isStale:a.isStale,cacheControl:a.cacheControl,value:(null==(b=a.value)?void 0:b.kind)===d.CachedRouteKind.PAGES?{kind:d.CachedRouteKind.PAGES,html:e.default.fromStatic(a.value.html),pageData:a.value.pageData,headers:a.value.headers,status:a.value.status}:(null==(c=a.value)?void 0:c.kind)===d.CachedRouteKind.APP_PAGE?{kind:d.CachedRouteKind.APP_PAGE,html:e.default.fromStatic(a.value.html),rscData:a.value.rscData,headers:a.value.headers,status:a.value.status,postponed:a.value.postponed,segmentData:a.value.segmentData}:a.value}:null}function i(a){switch(a){case f.RouteKind.PAGES:return d.IncrementalCacheKind.PAGES;case f.RouteKind.APP_PAGE:return d.IncrementalCacheKind.APP_PAGE;case f.RouteKind.IMAGE:return d.IncrementalCacheKind.IMAGE;case f.RouteKind.APP_ROUTE:return d.IncrementalCacheKind.APP_ROUTE;default:throw Object.defineProperty(Error(`Unexpected route kind ${a}`),"__NEXT_ERROR_CODE",{value:"E64",enumerable:!1,configurable:!0})}}},8992:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addPathSuffix",{enumerable:!0,get:function(){return e}});let d=c(6290);function e(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:e,hash:f}=(0,d.parsePath)(a);return""+c+b+e+f}},9248:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"MISSING_ROOT_TAGS_ERROR",{enumerable:!0,get:function(){return c}});let c="NEXT_MISSING_ROOT_TAGS";("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},9264:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{isAbortError:function(){return i},pipeToNodeResponse:function(){return j}});let d=c(3134),e=c(3367),f=c(2410),g=c(772),h=c(7589);function i(a){return(null==a?void 0:a.name)==="AbortError"||(null==a?void 0:a.name)===d.ResponseAbortedName}async function j(a,b,c){try{let{errored:i,destroyed:j}=b;if(i||j)return;let k=(0,d.createAbortController)(b),l=function(a,b){let c=!1,d=new e.DetachedPromise;function i(){d.resolve()}a.on("drain",i),a.once("close",()=>{a.off("drain",i),d.resolve()});let j=new e.DetachedPromise;return a.once("finish",()=>{j.resolve()}),new WritableStream({write:async b=>{if(!c){if(c=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let a=(0,h.getClientComponentLoaderMetrics)();a&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:a.clientComponentLoadStart,end:a.clientComponentLoadStart+a.clientComponentLoadTimes})}a.flushHeaders(),(0,f.getTracer)().trace(g.NextNodeServerSpan.startResponse,{spanName:"start response"},()=>void 0)}try{let c=a.write(b);"flush"in a&&"function"==typeof a.flush&&a.flush(),c||(await d.promise,d=new e.DetachedPromise)}catch(b){throw a.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:b}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:b=>{a.writableFinished||a.destroy(b)},close:async()=>{if(b&&await b,!a.writableFinished)return a.end(),j.promise}})}(b,c);await a.pipeTo(l,{signal:k.signal})}catch(a){if(i(a))return;throw Object.defineProperty(Error("failed to pipe response",{cause:a}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}},9596:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"pathHasPrefix",{enumerable:!0,get:function(){return e}});let d=c(6290);function e(a,b){if("string"!=typeof a)return!1;let{pathname:c}=(0,d.parsePath)(a);return c===b||c.startsWith(b+"/")}},9614:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{DOC_PREFETCH_RANGE_HEADER_VALUE:function(){return d},doesExportedHtmlMatchBuildId:function(){return g},insertBuildIdComment:function(){return f}});let c="",d="bytes=0-63";function e(a){return a.slice(0,24).replace(/-/g,"_")}function f(a,b){return b.includes("--\x3e")||!a.startsWith(c)?a:a.replace(c,c+"\x3c!--"+e(b)+"--\x3e")}function g(a,b){return a.startsWith(c+"\x3c!--"+e(b)+"--\x3e")}},9705:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getNextPathnameInfo",{enumerable:!0,get:function(){return g}});let d=c(2746),e=c(8156),f=c(9596);function g(a,b){var c,g;let{basePath:h,i18n:i,trailingSlash:j}=null!=(c=b.nextConfig)?c:{},k={pathname:a,trailingSlash:"/"!==a?a.endsWith("/"):j};h&&(0,f.pathHasPrefix)(k.pathname,h)&&(k.pathname=(0,e.removePathPrefix)(k.pathname,h),k.basePath=h);let l=k.pathname;if(k.pathname.startsWith("/_next/data/")&&k.pathname.endsWith(".json")){let a=k.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/");k.buildId=a[0],l="index"!==a[1]?"/"+a.slice(1).join("/"):"/",!0===b.parseData&&(k.pathname=l)}if(i){let a=b.i18nProvider?b.i18nProvider.analyze(k.pathname):(0,d.normalizeLocalePath)(k.pathname,i.locales);k.locale=a.detectedLocale,k.pathname=null!=(g=a.pathname)?g:k.pathname,!a.detectedLocale&&k.buildId&&(a=b.i18nProvider?b.i18nProvider.analyze(l):(0,d.normalizeLocalePath)(l,i.locales)).detectedLocale&&(k.locale=a.detectedLocale)}return k}},9833:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{fromNodeOutgoingHttpHeaders:function(){return e},normalizeNextQueryParam:function(){return i},splitCookiesString:function(){return f},toNodeOutgoingHttpHeaders:function(){return g},validateURL:function(){return h}});let d=c(2072);function e(a){let b=new Headers;for(let[c,d]of Object.entries(a))for(let a of Array.isArray(d)?d:[d])void 0!==a&&("number"==typeof a&&(a=a.toString()),b.append(c,a));return b}function f(a){var b,c,d,e,f,g=[],h=0;function i(){for(;h=a.length)&&g.push(a.substring(b,a.length))}return g}function g(a){let b={},c=[];if(a)for(let[d,e]of a.entries())"set-cookie"===d.toLowerCase()?(c.push(...f(e)),b[d]=1===c.length?c[0]:c):b[d]=e;return b}function h(a){try{return String(new URL(String(a)))}catch(b){throw Object.defineProperty(Error(`URL is malformed "${String(a)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:b}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function i(a){for(let b of[d.NEXT_QUERY_PARAM_PREFIX,d.NEXT_INTERCEPTION_MARKER_PREFIX])if(a!==b&&a.startsWith(b))return a.substring(b.length);return null}}}; \ No newline at end of file diff --git a/.next/server/chunks/855.js b/.next/server/chunks/855.js new file mode 100644 index 0000000..5dad937 --- /dev/null +++ b/.next/server/chunks/855.js @@ -0,0 +1,8 @@ +exports.id=855,exports.ids=[855],exports.modules={182:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>k});var e=c(8732),f=c(2015),g=c(8462),h=c(6659),i=c(3622),j=a([g,h,i]);[g,h,i]=j.then?(await j)():j;let k=()=>{let a=(0,g.useQueryClient)(),[b,c]=(0,f.useState)(!1),[d,j]=(0,f.useState)(null),[k,l]=(0,f.useState)({search:"",game:"",isFavorite:!1}),[m,n]=(0,f.useState)("grid"),{data:o=[],isLoading:p}=(0,g.useQuery)({queryKey:["collections",k],queryFn:()=>h.LO.collections.getCollections(k)}),q=(0,g.useMutation)({mutationFn:h.LO.collections.deleteCollection,onSuccess:()=>{a.invalidateQueries({queryKey:["collections"]})}}),r=(0,g.useMutation)({mutationFn:({id:a,isFavorite:b})=>h.LO.collections.updateCollection(a,{isFavorite:b}),onSuccess:()=>{a.invalidateQueries({queryKey:["collections"]})}}),s=o.filter(a=>{let b=!k.search||a.name.toLowerCase().includes(k.search.toLowerCase())||a.description?.toLowerCase().includes(k.search.toLowerCase()),c=!k.game||a.game===k.game,d=!k.isFavorite||a.isFavorite;return b&&c&&d});return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:"Collections"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mt-1",children:"Organize and manage your card collections"})]}),(0,e.jsxs)("button",{onClick:()=>c(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,e.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"New Collection"]})]}),(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4",children:(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,e.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,e.jsx)("input",{type:"text",value:k.search,onChange:a=>l(b=>({...b,search:a.target.value})),placeholder:"Search collections...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex space-x-2 overflow-x-auto pb-2",children:[(0,e.jsxs)("select",{value:k.game,onChange:a=>l(b=>({...b,game:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"",children:"All Games"}),(0,e.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,e.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,e.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,e.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"}),(0,e.jsx)("option",{value:"OTHER",children:"Other"})]}),(0,e.jsx)("button",{onClick:()=>l(a=>({...a,isFavorite:!a.isFavorite})),className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${k.isFavorite?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300":"bg-surface-50 dark:bg-surface-700 text-surface-700 dark:text-surface-300 border border-surface-300 dark:border-surface-600"}`,children:"⭐ Favorites"})]}),(0,e.jsxs)("div",{className:"flex bg-surface-100 dark:bg-surface-700 rounded-lg p-1",children:[(0,e.jsx)("button",{onClick:()=>n("grid"),className:`p-2 rounded-md transition-colors ${"grid"===m?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}),(0,e.jsx)("button",{onClick:()=>n("list"),className:`p-2 rounded-md transition-colors ${"list"===m?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})})]})]})]})}),p?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsxs)("div",{className:"flex flex-col items-center",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,e.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,e.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading collections..."})]})}):0===s.length?(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-8",children:(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,e.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("h3",{className:"text-xl font-semibold text-surface-900 dark:text-white mb-2",children:0===o.length?"No collections yet":"No matching collections"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:0===o.length?"Create your first collection to start organizing your cards":"Try adjusting your search or filters"}),0===o.length&&(0,e.jsx)("button",{onClick:()=>c(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-6 py-3 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:"Create Collection"})]})}):(0,e.jsx)("div",{className:"grid"===m?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4":"space-y-4",children:s.map(a=>(0,e.jsxs)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-all duration-200 hover:shadow-md",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,e.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,e.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:a.color||"#8b5cf6"},children:a.icon||"\uD83D\uDCDA"}),(0,e.jsxs)("div",{className:"flex-1",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:a.name}),a.description&&(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 line-clamp-2",children:a.description})]})]}),(0,e.jsx)("button",{onClick:()=>(a=>{r.mutate({id:a.id,isFavorite:!a.isFavorite})})(a),className:`p-2 rounded-lg transition-colors ${a.isFavorite?"text-yellow-500 hover:text-yellow-600":"text-surface-400 hover:text-yellow-500"}`,children:(0,e.jsx)("svg",{className:"w-5 h-5",fill:a.isFavorite?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,e.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-surface-600 dark:text-surface-400",children:[(0,e.jsxs)("span",{children:[a.cardCount||0," cards"]}),a.totalValue&&(0,e.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-medium",children:["$",a.totalValue.toFixed(2)]})]}),a.game&&(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(a.game)}`,children:a.game})]}),(0,e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,e.jsx)("button",{onClick:()=>{},className:"flex-1 bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 py-2 px-3 rounded-lg text-sm font-medium hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors",children:"View Cards"}),(0,e.jsx)("button",{onClick:()=>j(a.id),className:"p-2 text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 rounded-lg transition-colors",children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,e.jsx)("button",{onClick:()=>{var b,c;return b=a.id,c=a.name,void(window.confirm(`Are you sure you want to delete "${c}"? This action cannot be undone.`)&&q.mutate(b))},className:"p-2 text-red-400 hover:text-red-600 rounded-lg transition-colors",disabled:q.isPending,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]},a.id))}),(0,e.jsx)(i.A,{isOpen:b||!!d,onClose:()=>{c(!1),j(null)},collectionId:d||void 0})]})};d()}catch(a){d(a)}})},231:(a,b,c)=>{"use strict";c.d(b,{A:()=>h});var d=c(8732),e=c(2015),f=c(4822),g=c(4670);let h=()=>{let{login:a}=(0,g.A)(),[b,c]=(0,e.useState)({email:"",password:""}),[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(null),[l,m]=(0,e.useState)(!1),n=async c=>{c.preventDefault(),i(!0),k(null);try{await a(b.email,b.password)}catch(a){k(a instanceof Error?a.message:"Login failed")}finally{i(!1)}},o=a=>{c(b=>({...b,[a.target.name]:a.target.value}))};return(0,d.jsxs)("div",{className:"bg-white dark:bg-surface-800 p-8 rounded-2xl shadow-xl border border-surface-200 dark:border-surface-700 transition-colors",children:[(0,d.jsxs)("div",{className:"text-center mb-8",children:[(0,d.jsx)("div",{className:"w-16 h-16 bg-gradient-to-r from-primary-500 to-accent-500 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-lg",children:(0,d.jsx)("svg",{className:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white mb-2",children:"Welcome Back"}),(0,d.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:"Sign in to your TCG Vault"})]}),j&&(0,d.jsx)("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl",children:(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)("svg",{className:"w-5 h-5 text-red-500 mr-2",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),(0,d.jsx)("span",{className:"text-red-700 dark:text-red-400 text-sm",children:j})]})}),(0,d.jsxs)("form",{onSubmit:n,className:"space-y-6",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Email Address"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:"email",id:"email",name:"email",value:b.email,onChange:o,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"Enter your email",required:!0}),(0,d.jsx)("svg",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Password"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:l?"text":"password",id:"password",name:"password",value:b.password,onChange:o,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors pr-12",placeholder:"Enter your password",required:!0}),(0,d.jsx)("button",{type:"button",onClick:()=>m(!l),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-400 dark:text-surface-500 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:l?(0,d.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.878 9.878L3 3m6.878 6.878L21 21"})}):(0,d.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,d.jsx)("button",{type:"submit",disabled:h,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-3 px-4 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:h?(0,d.jsxs)("div",{className:"flex items-center justify-center",children:[(0,d.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,d.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Signing In..."]}):"Sign In"}),(0,d.jsx)("div",{className:"text-center",children:(0,d.jsxs)("p",{className:"text-surface-600 dark:text-surface-400",children:["Don't have an account?"," ",(0,d.jsx)(f.Link,{to:"/register",className:"text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-medium transition-colors",children:"Sign up"})]})})]})]})}},367:(a,b,c)=>{"use strict";function d(a){return a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"removeBasePath",{enumerable:!0,get:function(){return d}}),c(617),("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},452:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>o});var e=c(8732),f=c(2015),g=c(8462),h=c(6659),i=c(5891),j=c(7594),k=c(1862),l=c(4937),m=c(5678),n=a([g,h,i,j,k]);[g,h,i,j,k]=n.then?(await n)():n;let o=()=>{let[a,b]=(0,f.useState)(""),[c,d]=(0,f.useState)({game:"",rarity:"",status:"all",search:""}),[n,o]=(0,f.useState)("card"),[p,q]=(0,f.useState)(!1),[r,s]=(0,f.useState)(!1),[t,u]=(0,f.useState)(null),{data:v=[],isLoading:w,error:x}=(0,g.useQuery)({queryKey:["user-cards",{...c,search:a}],queryFn:()=>h.LO.cards.getUserCards({...c,search:a})}),y=v.filter(a=>{let b=a.card;return!!b&&(!c.rarity||b.rarity===c.rarity)&&(!c.game||b.game===c.game)&&(!c.status||"all"===c.status||a.status===c.status)}),z=a=>{switch(a){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}},A=a=>{switch(a.toLowerCase()){case"common":default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300";case"uncommon":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"rare":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"super rare":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"legendary":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"mythic":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}},B=a=>{switch(a){case"owned":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"wanted":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}};return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:"My Cards"}),(0,e.jsxs)("p",{className:"text-surface-600 dark:text-surface-400 mt-1",children:[y.length," cards in your collection"]})]}),(0,e.jsxs)("div",{className:"flex space-x-3",children:[(0,e.jsxs)("button",{onClick:()=>q(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,e.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"Add Cards"]}),(0,e.jsxs)("button",{onClick:()=>s(!0),className:"bg-gradient-to-r from-accent-500 to-primary-500 hover:from-accent-600 hover:to-primary-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,e.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),"Browse Database"]})]})]}),(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4",children:(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,e.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,e.jsx)("input",{type:"text",value:a,onChange:a=>b(a.target.value),placeholder:"Search your cards...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex space-x-2 overflow-x-auto pb-2",children:[(0,e.jsxs)("select",{value:c.game,onChange:a=>d(b=>({...b,game:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"",children:"All Games"}),(0,e.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,e.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,e.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,e.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]}),(0,e.jsxs)("select",{value:c.rarity,onChange:a=>d(b=>({...b,rarity:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"",children:"All Rarities"}),(0,e.jsx)("option",{value:"Common",children:"Common"}),(0,e.jsx)("option",{value:"Uncommon",children:"Uncommon"}),(0,e.jsx)("option",{value:"Rare",children:"Rare"}),(0,e.jsx)("option",{value:"Super Rare",children:"Super Rare"}),(0,e.jsx)("option",{value:"Legendary",children:"Legendary"}),(0,e.jsx)("option",{value:"Mythic",children:"Mythic"})]}),(0,e.jsxs)("select",{value:c.status,onChange:a=>d(b=>({...b,status:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"all",children:"All Cards"}),(0,e.jsx)("option",{value:"owned",children:"Owned"}),(0,e.jsx)("option",{value:"wanted",children:"Wanted"})]})]}),(0,e.jsxs)("div",{className:"flex bg-surface-100 dark:bg-surface-700 rounded-lg p-1",children:[(0,e.jsx)("button",{onClick:()=>o("card"),className:`p-2 rounded-md transition-colors ${"card"===n?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}),(0,e.jsx)("button",{onClick:()=>o("list"),className:`p-2 rounded-md transition-colors ${"list"===n?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})})]})]})]})}),w&&(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsxs)("div",{className:"flex flex-col items-center",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,e.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,e.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading your cards..."})]})}),x&&(0,e.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl p-4 mb-6",children:(0,e.jsx)("p",{className:"text-red-800 dark:text-red-400",children:"Error loading cards. Please try again."})}),!w&&!x&&(0,e.jsx)(e.Fragment,{children:0===y.length?(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-8",children:(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,e.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("h3",{className:"text-xl font-semibold text-surface-900 dark:text-white mb-2",children:0===v.length?"No cards yet":"No matching cards"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:0===v.length?"Start building your collection by adding cards":"Try adjusting your search or filters"}),0===v.length&&(0,e.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 items-center justify-center",children:[(0,e.jsx)("button",{onClick:()=>q(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-6 py-3 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:"Browse Cards"}),(0,e.jsx)("button",{className:"bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-800 dark:text-surface-300 px-6 py-3 rounded-xl font-medium transition-colors",children:"Scan Cards"})]})]})}):"card"===n?(0,e.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:y.map(a=>{let b=a.card;return b?(0,e.jsxs)(m.A,{rarity:b.rarity,className:"bg-white dark:bg-surface-800 rounded-xl shadow overflow-hidden hover:shadow-lg transition-all duration-200",children:[(0,e.jsx)("div",{className:"flex justify-center p-4 bg-surface-50 dark:bg-surface-700/50",children:(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)(l.A,{card:b,size:"large",className:"mx-auto"}),(0,e.jsx)("div",{className:"absolute -top-2 -right-2",children:(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${B(a.status)}`,children:"owned"===a.status?"✅":"❤️"})}),a.quantity>1&&(0,e.jsx)("div",{className:"absolute -bottom-2 -right-2",children:(0,e.jsxs)("span",{className:"bg-surface-800 dark:bg-surface-200 text-white dark:text-surface-900 text-xs font-bold px-2 py-1 rounded-full",children:[a.quantity,"x"]})})]})}),(0,e.jsxs)("div",{className:"p-4",children:[(0,e.jsxs)("div",{className:"flex justify-between items-start mb-3",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",title:b.name,children:b.name}),(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 truncate",children:b.set_name})]}),(0,e.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${z(b.game)}`,children:b.game})]}),(0,e.jsxs)("div",{className:"space-y-1 mb-3",children:[b.card_type&&(0,e.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 truncate",title:b.card_type,children:b.card_type}),(0,e.jsxs)("div",{className:"flex justify-between items-center",children:[b.mana_cost&&(0,e.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:["Cost: ",b.mana_cost]}),b.power&&b.toughness&&(0,e.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:[b.power,"/",b.toughness]})]})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,e.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${A(b.rarity)}`,children:b.rarity}),b.current_price&&(0,e.jsxs)("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:["$",b.current_price.toFixed(2)]})]}),a.condition&&"owned"===a.status&&(0,e.jsx)("div",{className:"mb-3",children:(0,e.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a){case"mint":return"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300";case"near_mint":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"excellent":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"good":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"light_played":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"played":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300";case"poor":return"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(a.condition)}`,children:a.condition.replace("_"," ").toUpperCase()})}),(0,e.jsx)("button",{onClick:()=>u(a.id),className:"w-full bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-800 dark:text-surface-300 py-2 px-3 rounded-lg text-sm font-medium transition-colors",children:"Edit Card"})]})]},a.id):null})}):(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 overflow-hidden",children:(0,e.jsx)("div",{className:"space-y-1",children:y.map(a=>{let b=a.card;return b?(0,e.jsxs)("div",{className:"flex items-center p-4 hover:bg-surface-50 dark:hover:bg-surface-700/50 transition-colors",children:[(0,e.jsx)("div",{className:"w-12 h-16 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center flex-shrink-0 mr-4",children:b.image_url?(0,e.jsx)("img",{src:b.image_url,alt:b.name,className:"w-full h-full object-cover rounded-lg"}):(0,e.jsx)("svg",{className:"w-4 h-4 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",children:b.name}),(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 truncate",children:b.set_name}),(0,e.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${z(b.game)}`,children:b.game}),(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${A(b.rarity)}`,children:b.rarity}),(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${B(a.status)}`,children:a.status})]})]}),(0,e.jsxs)("div",{className:"text-right mr-4",children:[(0,e.jsxs)("div",{className:"text-sm font-medium text-surface-900 dark:text-white",children:[a.quantity,"x"]}),b.current_price&&(0,e.jsxs)("div",{className:"text-sm text-green-600 dark:text-green-400",children:["$",(b.current_price*a.quantity).toFixed(2)]})]}),(0,e.jsx)("button",{onClick:()=>u(a.id),className:"p-2 text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 rounded-lg transition-colors",children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})})]},a.id):null})})})}),(0,e.jsx)(i.A,{isOpen:p,onClose:()=>q(!1)}),t&&(0,e.jsx)(k.A,{isOpen:!!t,onClose:()=>u(null),cardId:t}),(0,e.jsx)(j.A,{isOpen:r,onClose:()=>s(!1),onCardSelect:a=>{console.log("Selected card from database:",a),s(!1)}})]})};d()}catch(a){d(a)}})},617:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"hasBasePath",{enumerable:!0,get:function(){return e}});let d=c(9596);function e(a){return(0,d.pathHasPrefix)(a,"")}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},651:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isLocalURL",{enumerable:!0,get:function(){return f}});let d=c(4718),e=c(617);function f(a){if(!(0,d.isAbsoluteUrl)(a))return!0;try{let b=(0,d.getLocationOrigin)(),c=new URL(a,b);return c.origin===b&&(0,e.hasBasePath)(c.pathname)}catch(a){return!1}}},717:(a,b,c)=>{"use strict";c.d(b,{A:()=>r});var d=c(8732),e=c(2015),f=c(4822);let g=({onModeSelect:a})=>(0,d.jsx)("div",{className:"min-h-screen bg-gray-50 px-4 py-6 sm:px-6 lg:px-8",children:(0,d.jsxs)("div",{className:"max-w-md mx-auto sm:max-w-2xl",children:[(0,d.jsxs)("div",{className:"text-center mb-8",children:[(0,d.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold text-gray-900 mb-3",children:"Card Scanner"}),(0,d.jsx)("p",{className:"text-gray-600 text-sm sm:text-base px-2",children:"Choose your scanning mode to get started"})]}),(0,d.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 mb-8",children:[{id:"add-to-database",title:"Add Cards to Database",description:"Scan new cards and add them to your collections",icon:"\uD83D\uDCDA",color:"bg-blue-500 hover:bg-blue-600 active:bg-blue-700"},{id:"search-collections",title:"Search Collections",description:"Find these cards in your existing collections",icon:"\uD83D\uDD0D",color:"bg-green-500 hover:bg-green-600 active:bg-green-700"},{id:"price-check",title:"Price Check",description:"Get real-time pricing for your cards",icon:"\uD83D\uDCB0",color:"bg-yellow-500 hover:bg-yellow-600 active:bg-yellow-700"},{id:"deck-building",title:"Deck Building",description:"Scan cards directly into a deck with legality checks",icon:"\uD83C\uDFAF",color:"bg-purple-500 hover:bg-purple-600 active:bg-purple-700"}].map(b=>(0,d.jsxs)("button",{onClick:()=>a(b.id),className:`${b.color} text-white rounded-xl shadow-lg transition-all duration-200 hover:shadow-xl transform hover:scale-[1.02] active:scale-[0.98] text-left relative overflow-hidden`,style:{minHeight:"120px"},children:[(0,d.jsxs)("div",{className:"p-6 sm:p-6 h-full flex flex-col",children:[(0,d.jsxs)("div",{className:"flex items-start space-x-4 mb-3",children:[(0,d.jsx)("div",{className:"text-3xl sm:text-4xl flex-shrink-0",role:"img","aria-label":b.title,children:b.icon}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)("h3",{className:"text-lg sm:text-xl font-semibold leading-tight mb-2",children:b.title})})]}),(0,d.jsx)("p",{className:"text-white/90 text-sm sm:text-base leading-relaxed flex-1",children:b.description})]}),(0,d.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-white/10 to-transparent pointer-events-none"})]},b.id))}),(0,d.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-5 sm:p-6",children:[(0,d.jsxs)("div",{className:"flex items-center mb-4",children:[(0,d.jsx)("span",{className:"text-2xl mr-3",role:"img","aria-label":"Tips",children:"\uD83D\uDCA1"}),(0,d.jsx)("h2",{className:"font-semibold text-gray-900 text-lg",children:"Pro Tips"})]}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,d.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full mt-2 flex-shrink-0"}),(0,d.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"Position cards clearly within the camera frame"})]}),(0,d.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,d.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full mt-2 flex-shrink-0"}),(0,d.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"Scanner will auto-detect cards after 2-3 seconds"})]}),(0,d.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,d.jsx)("div",{className:"w-2 h-2 bg-purple-500 rounded-full mt-2 flex-shrink-0"}),(0,d.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"You can scan up to 100 cards in a single session"})]}),(0,d.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,d.jsx)("div",{className:"w-2 h-2 bg-yellow-500 rounded-full mt-2 flex-shrink-0"}),(0,d.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"Duplicates are allowed and will be tracked separately"})]})]})]}),(0,d.jsx)("div",{className:"h-8 sm:h-4"})]})}),h=({isVisible:a,message:b,progress:c,type:e="scanning"})=>a?(0,d.jsx)("div",{className:"fixed top-4 left-4 right-4 z-50 animate-slide-down sm:left-1/2 sm:right-auto sm:transform sm:-translate-x-1/2 sm:w-auto sm:min-w-80 sm:max-w-md",children:(0,d.jsx)("div",{className:`${(()=>{switch(e){case"scanning":default:return"bg-blue-600 text-white";case"processing":return"bg-purple-600 text-white";case"success":return"bg-green-600 text-white";case"error":return"bg-red-600 text-white"}})()} rounded-xl shadow-lg px-4 py-3 sm:px-5 sm:py-4`,children:(0,d.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,d.jsx)("div",{className:"text-lg sm:text-xl flex-shrink-0",role:"img","aria-label":e,children:(()=>{switch(e){case"scanning":default:return"\uD83D\uDCF7";case"processing":return"\uD83E\uDD16";case"success":return"✅";case"error":return"❌"}})()}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("div",{className:"font-medium text-sm sm:text-base leading-tight",children:b}),void 0!==c&&(0,d.jsx)("div",{className:"mt-2",children:(0,d.jsx)("div",{className:"w-full bg-white/20 rounded-full h-1.5 sm:h-2",children:(0,d.jsx)("div",{className:"bg-white h-1.5 sm:h-2 rounded-full transition-all duration-300 ease-out",style:{width:`${Math.min(100,Math.max(0,c))}%`}})})})]}),("scanning"===e||"processing"===e)&&(0,d.jsx)("div",{className:"w-5 h-5 sm:w-6 sm:h-6 flex-shrink-0",children:(0,d.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 sm:h-6 sm:w-6 border-2 border-white border-t-transparent"})})]})})}):null;class i{constructor(){this.apiKey=null,this.apiKey=process.env.REACT_APP_OPENAI_API_KEY||null}setApiKey(a){this.apiKey=a}async analyzeCard(a){if(!this.apiKey)throw Error("OpenAI API key not configured");try{let b=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:"gpt-4o-mini",messages:[{role:"user",content:[{type:"text",text:'Analyze this trading card image and extract information. Respond with ONLY valid JSON, no markdown formatting or code blocks:\n\n{"cardName": "exact card name", "setName": "set name if visible", "setCode": "3-4 letter set code if visible", "cardType": "creature, spell, pokemon, etc", "rarity": "common, uncommon, rare, etc", "hp": "HP value for Pokemon", "attacks": ["attack names"], "abilities": ["ability names"], "rawText": "all visible text on the card", "game": "MTG or POKEMON or LORCANA", "confidence": 95}\n\nIMPORTANT: Return ONLY the JSON object, no markdown code blocks. Focus on accuracy, leave fields empty if unclear. For the cardName, use the exact name as printed on the card.'},{type:"image_url",image_url:{url:a,detail:"high"}}]}],max_tokens:1e3,temperature:.1})});if(!b.ok)throw Error(`OpenAI API error: ${b.status} ${b.statusText}`);let c=await b.json(),d=c.choices[0]?.message?.content;if(!d)throw Error("No content received from OpenAI");try{let a=d.trim();a.startsWith("```json")?a=a.replace(/^```json\s*/,"").replace(/\s*```$/,""):a.startsWith("```")&&(a=a.replace(/^```\s*/,"").replace(/\s*```$/,""));let b=JSON.parse(a);return{cardName:b.cardName||"",setName:b.setName||void 0,setCode:b.setCode||void 0,cardType:b.cardType||void 0,rarity:b.rarity||void 0,hp:b.hp||void 0,attacks:b.attacks||[],abilities:b.abilities||[],rawText:b.rawText||d,confidence:b.confidence||85,game:b.game||"UNKNOWN"}}catch(b){console.log("JSON parsing failed, trying text extraction:",b),console.log("Raw content:",d);let a=this.extractDataFromRawResponse(d);return{cardName:a.cardName||"Unknown Card",setName:a.setName,setCode:a.setCode,cardType:a.cardType,rarity:a.rarity,hp:a.hp,attacks:a.attacks||[],abilities:a.abilities||[],rawText:d,confidence:70,game:a.game||"UNKNOWN"}}}catch(a){throw console.error("AI OCR error:",a),Error(`AI OCR failed: ${a.message}`)}}extractCardNameFromText(a){let b=a.split("\n").map(a=>a.trim()).filter(a=>a.length>0);for(let a of b)if(!a.match(/^(card name|name:|the card|this is)/i)&&a.length>3&&a.length<50)return a;return b[0]||"Unknown Card"}extractDataFromRawResponse(a){let b=a.split("\n").map(a=>a.trim()).filter(a=>a.length>0),c="",d="",e="",f="",g="",h=[],i=[];for(let a of b)!(a.startsWith("```")||a.startsWith("#"))&&(a.match(/card\s*name[:−]?\s*(.+)/i)?c=a.replace(/card\s*name[:−]?\s*/i,"").replace(/['"]/g,""):a.match(/name[:−]?\s*(.+)/i)&&!c?c=a.replace(/name[:−]?\s*/i,"").replace(/['"]/g,""):a.match(/set[:−]?\s*(.+)/i)?d=a.replace(/set[:−]?\s*/i,"").replace(/['"]/g,""):a.match(/hp[:−]?\s*(\d+)/i)?g=a.match(/hp[:−]?\s*(\d+)/i)?.[1]||"":a.match(/type[:−]?\s*(.+)/i)?e=a.replace(/type[:−]?\s*/i,"").replace(/['"]/g,""):a.match(/rarity[:−]?\s*(.+)/i)&&(f=a.replace(/rarity[:−]?\s*/i,"").replace(/['"]/g,"")));return c||(c=this.extractCardNameFromText(a)),{cardName:c||"Unknown Card",setName:d||void 0,setCode:void 0,cardType:e||void 0,rarity:f||void 0,hp:g||void 0,attacks:h.length>0?h:void 0,abilities:i.length>0?i:void 0,game:this.detectGameFromText(a)}}detectGameFromText(a){let b=a.toLowerCase();return b.includes("pokemon")||b.includes("hp")||b.includes("evolves")?"POKEMON":b.includes("mana")||b.includes("creature")||b.includes("instant")?"MTG":b.includes("lorcana")||b.includes("ink")?"LORCANA":"UNKNOWN"}}class j{constructor(a="http://localhost:11434"){this.baseUrl=a}async analyzeCard(a){try{let b=a.split(",")[1],c=await fetch(`${this.baseUrl}/api/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:"llava:latest",prompt:`Analyze this trading card image and extract: +1. Card name (exact spelling) +2. Set name and code +3. Game type (Magic: The Gathering, Pokemon, or Lorcana) +4. All visible text +5. Card type and rarity if visible + +Provide accurate information only. Format as JSON with fields: cardName, setName, setCode, game, cardType, rarity, rawText`,images:[b],stream:!1})});if(!c.ok)throw Error(`Ollama API error: ${c.status}`);let d=(await c.json()).response;try{let a=JSON.parse(d);return{cardName:a.cardName||"",setName:a.setName,setCode:a.setCode,cardType:a.cardType,rarity:a.rarity,rawText:a.rawText||d,confidence:85,game:a.game?.toUpperCase()||"UNKNOWN"}}catch{return{cardName:this.extractCardNameFromText(d),rawText:d,confidence:75,game:this.detectGameFromText(d)}}}catch(a){throw console.error("Ollama OCR error:",a),Error(`Ollama OCR failed: ${a.message}`)}}extractCardNameFromText(a){return a.split("\n").map(a=>a.trim()).filter(a=>a.length>0).find(a=>a.length>3&&a.length<50)||"Unknown Card"}detectGameFromText(a){let b=a.toLowerCase();return b.includes("pokemon")||b.includes("hp")?"POKEMON":b.includes("mana")||b.includes("creature")?"MTG":b.includes("lorcana")?"LORCANA":"UNKNOWN"}}let k=new i,l=new j,m=({onCardScanned:a,onError:b,isActive:c,maxQueueSize:f=100})=>{let g=(0,e.useRef)(null),i=(0,e.useRef)(null),j=(0,e.useRef)(null),m=(0,e.useRef)(null),n=(0,e.useRef)(0),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)({isScanning:!1,isProcessing:!1,message:"",countdown:0}),[s,t]=(0,e.useState)(0),[u,v]=(0,e.useState)(new Set),[w,x]=(0,e.useState)(!1);(0,e.useEffect)(()=>{(async()=>{try{let a=localStorage.getItem("openai_api_key"),b=localStorage.getItem("tcg_vault_token");if(b)try{let a=await fetch("/api/user/preferences",{headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json"}});if(a.ok){let b=await a.json(),c=b.preferences?.ocrSettings?.openai_api_key;if(c){k.setApiKey(c),x(!0),console.log("✅ OCR configured with user preferences API key");return}}}catch(a){console.log("Could not load user preferences, checking localStorage...")}a?(k.setApiKey(a),x(!0),console.log("✅ OCR configured with localStorage API key")):(console.log("❌ No OpenAI API key found. OCR scanning will not work."),x(!1))}catch(a){console.error("Error initializing OCR:",a),x(!1)}})()},[]),(0,e.useEffect)(()=>(c?y():z(),()=>{z()}),[c]),(0,e.useEffect)(()=>{if(!o||!c||!w)return;let a=setInterval(()=>{Date.now()-n.current>5e3&&(()=>{if(q.isProcessing||s>=f)return;m.current&&clearTimeout(m.current),r(a=>({...a,isScanning:!0,message:"Card detected, stabilizing...",countdown:3}));let a=3,b=setInterval(()=>{a--,r(b=>({...b,countdown:a,message:a>0?`Scanning in ${a}...`:"Scanning card..."})),a<=0&&(clearInterval(b),B())},1e3);m.current=setTimeout(()=>{clearInterval(b),B()},3e3)})()},2e3);return()=>{clearInterval(a),m.current&&clearTimeout(m.current)}},[o,c,q.isProcessing,s,f,w]);let y=async()=>{try{let a=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:{ideal:1920},height:{ideal:1080}}});g.current&&(g.current.srcObject=a,j.current=a,g.current.onloadedmetadata=()=>{g.current?.play().then(()=>{p(!0)})})}catch(a){console.error("Camera error:",a),b(`Camera access failed: ${a.message}`)}},z=()=>{j.current&&(j.current.getTracks().forEach(a=>a.stop()),j.current=null),p(!1),r({isScanning:!1,isProcessing:!1,message:"",countdown:0})},A=(0,e.useCallback)(()=>{if(!g.current||!i.current)return null;let a=g.current,b=i.current,c=b.getContext("2d");return c?(b.width=a.videoWidth,b.height=a.videoHeight,c.drawImage(a,0,0,b.width,b.height),b.toDataURL("image/jpeg",.8)):null},[]),B=(0,e.useCallback)(async()=>{if(!q.isProcessing&&!(s>=f)){if(!w){r(a=>({...a,isScanning:!1,isProcessing:!1,message:"OCR not configured - please set up your API key in Settings"})),setTimeout(()=>{r(a=>({...a,message:""}))},4e3);return}r(a=>({...a,isScanning:!1,isProcessing:!0,message:"Processing card with AI...",countdown:0}));try{let b,c=A();if(!c)throw Error("Failed to capture image");try{console.log("\uD83E\uDD16 Trying OpenAI Vision API..."),b=await k.analyzeCard(c),console.log("✅ OpenAI Vision result:",b)}catch(a){console.log("❌ OpenAI failed, trying Ollama:",a);try{b=await l.analyzeCard(c),console.log("✅ Ollama Vision result:",b)}catch(a){throw console.error("❌ All AI OCR methods failed"),Error("AI OCR services unavailable. Please configure OpenAI API key or run Ollama locally.")}}let d=`scan_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,e=(b.cardName||"unknown").toLowerCase().replace(/\s+/g,"");if(u.has(e))r(a=>({...a,isProcessing:!1,message:`Duplicate detected: ${b.cardName||"Unknown Card"}`}));else{v(a=>{let b=new Set(a);if(b.add(e),b.size>10){let a=b.values().next().value;b.delete(a)}return b});let f={id:d,cardData:b,imageDataUrl:c,timestamp:Date.now(),queuePosition:s+1};a(f),t(a=>a+1),n.current=Date.now(),r(a=>({...a,isProcessing:!1,message:`Added: ${b.cardName||"Unknown Card"}`}))}setTimeout(()=>{r(a=>({...a,message:""}))},2e3)}catch(b){console.error("Scan processing error:",b);let a="Scan failed, try again";b.message.includes("OpenAI API key not configured")?a="OpenAI API key not configured - check Settings":b.message.includes("OpenAI API error: 401")?a="Invalid OpenAI API key - check Settings":b.message.includes("OpenAI API error: 429")?a="API rate limit exceeded - wait a moment":b.message.includes("AI OCR services unavailable")&&(a="OCR service unavailable - configure API key"),r(b=>({...b,isProcessing:!1,message:a})),setTimeout(()=>{r(a=>({...a,message:""}))},4e3)}}},[A,a,s,f,u,q.isProcessing,w]);return(0,d.jsxs)("div",{className:"relative px-4 sm:px-0",children:[(0,d.jsx)(h,{isVisible:q.isScanning||q.isProcessing||!!q.message,message:q.message,progress:q.isScanning?(3-q.countdown)/3*100:void 0,type:q.isProcessing?"processing":q.message.includes("Added:")?"success":q.message.includes("not configured")||q.message.includes("unavailable")?"error":"scanning"}),!w&&o&&(0,d.jsx)("div",{className:"mb-4 bg-yellow-50 border border-yellow-200 rounded-xl p-4",children:(0,d.jsxs)("div",{className:"flex items-start",children:[(0,d.jsx)("span",{className:"text-yellow-600 text-xl mr-3 flex-shrink-0 mt-0.5",children:"⚠️"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-900 text-sm sm:text-base",children:"OCR Not Configured"}),(0,d.jsx)("p",{className:"text-yellow-700 text-sm mt-1",children:"Please configure your OpenAI API key in Settings to enable card scanning."})]})]})}),(0,d.jsxs)("div",{className:"relative bg-black rounded-xl overflow-hidden shadow-lg",children:[(0,d.jsx)("video",{ref:g,autoPlay:!0,playsInline:!0,muted:!0,className:"w-full h-auto object-cover",style:{minHeight:"280px",maxHeight:"calc(100vh - 300px)",aspectRatio:"4/3"}}),o&&(0,d.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[(0,d.jsx)("div",{className:"absolute inset-4 sm:inset-6 border-2 border-white border-dashed rounded-lg flex items-center justify-center",children:(0,d.jsxs)("div",{className:"bg-black bg-opacity-60 text-white px-4 py-3 rounded-xl text-center max-w-xs",children:[(0,d.jsx)("div",{className:"font-medium text-sm sm:text-base mb-1",children:"Position card within this area"}),(0,d.jsx)("div",{className:"text-xs sm:text-sm opacity-90",children:w?"Auto-scan in 2-3 seconds":"Configure OCR in Settings first"})]})}),(0,d.jsxs)("div",{className:"absolute top-3 right-3 sm:top-4 sm:right-4 bg-blue-600 text-white px-3 py-1.5 rounded-full text-xs sm:text-sm font-medium shadow-lg",children:["Queue: ",s,"/",f]}),q.isScanning&&(0,d.jsx)("div",{className:"absolute inset-0 bg-blue-500 bg-opacity-20 border-2 border-blue-500 rounded-xl animate-pulse"}),(0,d.jsx)("div",{className:"absolute bottom-4 left-4 right-4 flex justify-center",children:(0,d.jsx)("div",{className:"bg-black bg-opacity-50 backdrop-blur-sm rounded-full px-4 py-2",children:(0,d.jsxs)("div",{className:"flex items-center space-x-3 text-white text-xs",children:[(0,d.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,d.jsx)("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),(0,d.jsx)("span",{children:"Live"})]}),q.isScanning&&(0,d.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,d.jsx)("div",{className:"w-2 h-2 bg-blue-400 rounded-full animate-pulse"}),(0,d.jsx)("span",{children:"Scanning..."})]})]})})})]}),!o&&(0,d.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,d.jsxs)("div",{className:"text-white text-center",children:[(0,d.jsx)("div",{className:"text-4xl sm:text-5xl mb-3",children:"\uD83D\uDCF9"}),(0,d.jsx)("div",{className:"font-medium text-base sm:text-lg",children:"Starting Camera..."}),(0,d.jsx)("div",{className:"text-sm sm:text-base opacity-75 mt-1",children:"Please allow camera access"})]})})]}),(0,d.jsx)("canvas",{ref:i,className:"hidden"}),o&&(0,d.jsxs)("div",{className:"mt-6 text-center",children:[(0,d.jsx)("button",{onClick:()=>{!q.isProcessing&&s=f||!w,className:"w-full sm:w-auto bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white px-8 py-4 sm:px-6 sm:py-3 rounded-xl font-medium transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none text-base sm:text-sm",children:q.isProcessing?(0,d.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,d.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-white border-t-transparent"}),(0,d.jsx)("span",{children:"Processing..."})]}):w?(0,d.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,d.jsx)("span",{children:"\uD83D\uDCF7"}),(0,d.jsx)("span",{children:"Manual Scan"})]}):"Configure OCR First"}),!w&&(0,d.jsx)("p",{className:"text-sm text-gray-600 mt-3 px-4",children:"Go to Settings → OCR to configure your OpenAI API key"})]})]})},n=({cards:a,onRemoveCard:b,onClearQueue:c,onCardSelect:f,selectedCards:g,onViewCard:h})=>{let[i,j]=(0,e.useState)(!1),k=(0,e.useCallback)(()=>{let b=!i;j(b),a.forEach(a=>{f(a.id,b)})},[i,a,f]);return 0===a.length?(0,d.jsxs)("div",{className:"text-center py-16 px-4",children:[(0,d.jsx)("div",{className:"text-6xl sm:text-7xl mb-4",children:"\uD83D\uDCF7"}),(0,d.jsx)("h3",{className:"text-xl sm:text-2xl font-semibold text-gray-700 mb-2",children:"Queue is Empty"}),(0,d.jsx)("p",{className:"text-gray-500 text-sm sm:text-base",children:"Scanned cards will appear here"})]}):(0,d.jsxs)("div",{className:"space-y-4 px-4 sm:px-0",children:[(0,d.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4",children:[(0,d.jsxs)("h3",{className:"text-lg sm:text-xl font-semibold text-gray-900",children:["Scanned Cards (",a.length,"/100)"]}),(0,d.jsxs)("label",{className:"flex items-center space-x-2 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:i,onChange:k,className:"w-5 h-5 sm:w-4 sm:h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),(0,d.jsx)("span",{className:"text-sm sm:text-sm text-gray-700 font-medium",children:"Select All"})]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between sm:justify-end gap-2",children:[g.size>0&&(0,d.jsxs)("span",{className:"text-xs sm:text-sm text-gray-600 bg-blue-50 px-3 py-1.5 rounded-full font-medium",children:[g.size," selected"]}),(0,d.jsx)("button",{onClick:c,className:"px-4 py-2 text-sm bg-red-50 text-red-700 rounded-lg hover:bg-red-100 active:bg-red-200 transition-colors font-medium",children:"Clear All"})]})]})}),(0,d.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(a=>(0,d.jsxs)("div",{className:`relative bg-white rounded-xl shadow-sm border-2 transition-all duration-200 hover:shadow-md ${g.has(a.id)?"border-blue-500 bg-blue-50/30":"border-gray-100 hover:border-gray-200"}`,children:[(0,d.jsx)("div",{className:"absolute top-3 left-3 z-10",children:(0,d.jsx)("label",{className:"cursor-pointer",children:(0,d.jsx)("input",{type:"checkbox",checked:g.has(a.id),onChange:b=>f(a.id,b.target.checked),className:"w-5 h-5 text-blue-600 rounded focus:ring-blue-500 focus:ring-2 bg-white shadow-sm"})})}),(0,d.jsx)("button",{onClick:()=>b(a.id),className:"absolute top-3 right-3 z-10 w-8 h-8 bg-red-500 text-white rounded-full text-sm hover:bg-red-600 active:bg-red-700 transition-colors flex items-center justify-center shadow-sm","aria-label":"Remove card",children:"\xd7"}),(0,d.jsx)("div",{className:"aspect-[2.5/3.5] bg-gray-100 cursor-pointer overflow-hidden rounded-t-xl",onClick:()=>h(a),children:(0,d.jsx)("img",{src:a.imageDataUrl,alt:a.cardData.cardName||"Scanned card",className:"w-full h-full object-cover transition-transform duration-200 hover:scale-105"})}),(0,d.jsxs)("div",{className:"p-4 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("h4",{className:"font-medium text-gray-900 text-sm leading-tight line-clamp-2",children:a.cardData.cardName||"Unknown Card"}),a.cardData.setName&&(0,d.jsx)("p",{className:"text-xs text-gray-500 mt-1 line-clamp-1",children:a.cardData.setName})]}),(0,d.jsx)("div",{className:`px-2 py-1 rounded-full text-xs font-medium text-white flex-shrink-0 ${(a=>a?a>=.9?"bg-green-500":a>=.7?"bg-yellow-500":"bg-red-500":"bg-gray-400")(a.cardData.confidence)}`,children:(a=>a?`${Math.round(100*a)}%`:"Unknown")(a.cardData.confidence)})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[(0,d.jsx)("span",{className:"truncate",children:a.cardData.game||"Unknown Game"}),a.cardData.rarity&&(0,d.jsx)("span",{className:"capitalize flex-shrink-0 ml-2",children:a.cardData.rarity})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"text-xs text-gray-400",children:["#",a.queuePosition]}),(0,d.jsx)("div",{className:"text-xs text-gray-400",children:new Date(a.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})]},a.id))}),(0,d.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3 sm:gap-4",children:[(0,d.jsxs)("span",{className:"text-sm font-medium text-gray-900",children:["Total: ",a.length," cards"]}),(0,d.jsxs)("span",{className:"text-sm text-gray-600",children:["Selected: ",g.size]})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3 sm:gap-4",children:[(0,d.jsxs)("span",{className:"flex items-center space-x-1.5 text-xs sm:text-sm",children:[(0,d.jsx)("div",{className:"w-2.5 h-2.5 bg-green-500 rounded-full"}),(0,d.jsx)("span",{className:"text-gray-600",children:"High confidence"})]}),(0,d.jsxs)("span",{className:"flex items-center space-x-1.5 text-xs sm:text-sm",children:[(0,d.jsx)("div",{className:"w-2.5 h-2.5 bg-yellow-500 rounded-full"}),(0,d.jsx)("span",{className:"text-gray-600",children:"Medium"})]}),(0,d.jsxs)("span",{className:"flex items-center space-x-1.5 text-xs sm:text-sm",children:[(0,d.jsx)("div",{className:"w-2.5 h-2.5 bg-red-500 rounded-full"}),(0,d.jsx)("span",{className:"text-gray-600",children:"Low"})]})]})]})})]})},o=({selectedCount:a,onAddToCollection:b,onAddToDeck:c,onAddTags:f,onRemoveSelected:g,collections:h,decks:i,isProcessing:j})=>{let[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)("");if(0===a)return null;let w=()=>{m.trim()&&(f(m.split(",").map(a=>a.trim()).filter(Boolean)),n(""),l(!1))};return(0,d.jsxs)("div",{className:"bg-white border-t border-gray-200 px-4 py-6 sm:px-6",children:[(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[(0,d.jsxs)("h3",{className:"text-lg sm:text-xl font-semibold text-gray-900",children:["Bulk Operations (",a," selected)"]}),(0,d.jsx)("button",{onClick:g,className:"self-start sm:self-auto px-4 py-2 text-sm bg-red-50 text-red-700 rounded-lg hover:bg-red-100 active:bg-red-200 transition-colors font-medium",disabled:j,children:"Remove Selected"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("h4",{className:"font-medium text-gray-900 text-base",children:"Add to Collection"}),h.length>0&&(0,d.jsxs)("select",{className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white",onChange:a=>a.target.value&&b(a.target.value),defaultValue:"",disabled:j,children:[(0,d.jsx)("option",{value:"",children:"Select existing collection..."}),h.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]}),o?(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("input",{type:"text",value:q,onChange:a=>r(a.target.value),placeholder:"Collection name...",className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:j}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{onClick:()=>{q.trim()&&(b("",q.trim()),r(""),p(!1))},className:"flex-1 px-4 py-3 bg-blue-600 text-white rounded-xl text-sm font-medium hover:bg-blue-700 active:bg-blue-800 disabled:bg-gray-400 transition-colors",disabled:!q.trim()||j,children:"Create"}),(0,d.jsx)("button",{onClick:()=>p(!1),className:"px-4 py-3 bg-gray-100 text-gray-700 rounded-xl text-sm font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:j,children:"Cancel"})]})]}):(0,d.jsx)("button",{onClick:()=>p(!0),className:"w-full px-4 py-3 border-2 border-dashed border-gray-300 rounded-xl text-sm text-gray-600 hover:border-blue-400 hover:text-blue-600 active:border-blue-500 transition-colors font-medium",disabled:j,children:"+ Create New Collection"})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("h4",{className:"font-medium text-gray-900 text-base",children:"Add to Deck"}),i.length>0&&(0,d.jsxs)("select",{className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white",onChange:a=>a.target.value&&c(a.target.value),defaultValue:"",disabled:j,children:[(0,d.jsx)("option",{value:"",children:"Select existing deck..."}),i.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name},a.id))]}),s?(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("input",{type:"text",value:u,onChange:a=>v(a.target.value),placeholder:"Deck name...",className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:j}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{onClick:()=>{u.trim()&&(c("",u.trim()),v(""),t(!1))},className:"flex-1 px-4 py-3 bg-purple-600 text-white rounded-xl text-sm font-medium hover:bg-purple-700 active:bg-purple-800 disabled:bg-gray-400 transition-colors",disabled:!u.trim()||j,children:"Create"}),(0,d.jsx)("button",{onClick:()=>t(!1),className:"px-4 py-3 bg-gray-100 text-gray-700 rounded-xl text-sm font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:j,children:"Cancel"})]})]}):(0,d.jsx)("button",{onClick:()=>t(!0),className:"w-full px-4 py-3 border-2 border-dashed border-gray-300 rounded-xl text-sm text-gray-600 hover:border-purple-400 hover:text-purple-600 active:border-purple-500 transition-colors font-medium",disabled:j,children:"+ Create New Deck"})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("h4",{className:"font-medium text-gray-900 text-base",children:"Add Tags"}),k?(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("input",{type:"text",value:m,onChange:a=>n(a.target.value),placeholder:"Enter tags (comma-separated)...",className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:j,onKeyPress:a=>"Enter"===a.key&&w()}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{onClick:w,className:"flex-1 px-4 py-3 bg-green-600 text-white rounded-xl text-sm font-medium hover:bg-green-700 active:bg-green-800 disabled:bg-gray-400 transition-colors",disabled:!m.trim()||j,children:"Add Tags"}),(0,d.jsx)("button",{onClick:()=>l(!1),className:"px-4 py-3 bg-gray-100 text-gray-700 rounded-xl text-sm font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:j,children:"Cancel"})]})]}):(0,d.jsx)("button",{onClick:()=>l(!0),className:"w-full px-4 py-3 border-2 border-dashed border-gray-300 rounded-xl text-sm text-gray-600 hover:border-green-400 hover:text-green-600 active:border-green-500 transition-colors font-medium",disabled:j,children:"+ Add Tags"}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:"Quick Tags:"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:["Foil","Mint","Near Mint","Played","Favorite"].map(a=>(0,d.jsx)("button",{onClick:()=>f([a]),className:"px-3 py-2 bg-gray-100 text-gray-700 rounded-lg text-xs font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:j,children:a},a))})]})]})]}),j&&(0,d.jsx)("div",{className:"flex items-center justify-center py-8 mt-6 border-t border-gray-100",children:(0,d.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,d.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent"}),(0,d.jsx)("span",{className:"text-sm text-gray-600 font-medium",children:"Processing..."})]})})]})};class p{static generateTags(a){let b=[],c=[];if(a.game){let d=this.normalizeGame(a.game);b.push(d),c.push(`Game: ${d}`)}if(a.rarity){let d=this.normalizeRarity(a.rarity);b.push(d),c.push(`Rarity: ${d}`),this.isHighValueRarity(a.rarity)&&(b.push("High Value"),c.push("High-value rarity detected"))}if(a.setName){let d=this.generateSetTag(a.setName);d&&(b.push(d),c.push(`Set: ${d}`));let e=this.detectSpecialSets(a.setName);b.push(...e),e.length>0&&c.push(`Special sets: ${e.join(", ")}`)}if(a.cardType){let d=this.normalizeCardType(a.cardType);if(d&&(b.push(d),c.push(`Type: ${d}`)),a.power&&a.toughness){b.push("Creature");let d=this.categorizeCreaturePower(a.power,a.toughness);d&&(b.push(d),c.push(`Power level: ${d}`))}}if(a.manaCost){let d=this.analyzeManaColor(a.manaCost);b.push(...d),d.length>0&&c.push(`Mana colors: ${d.join(", ")}`)}if(a.element){let d=this.normalizeElement(a.element);d&&(b.push(d),c.push(`Element: ${d}`))}if(a.cardName){let d=this.analyzeCardName(a.cardName);b.push(...d),d.length>0&&c.push(`Name analysis: ${d.join(", ")}`)}return{tags:Array.from(new Set(b)).filter(a=>a.length>0),confidence:.8,reasoning:c.join("; ")}}static normalizeGame(a){return({"magic the gathering":"MTG",magic:"MTG",mtg:"MTG",pokemon:"Pokemon",pokémon:"Pokemon",lorcana:"Lorcana","disney lorcana":"Lorcana"})[a.toLowerCase()]||a}static normalizeRarity(a){return({c:"Common",common:"Common",u:"Uncommon",uncommon:"Uncommon",r:"Rare",rare:"Rare",m:"Mythic",mythic:"Mythic","mythic rare":"Mythic",sr:"Super Rare","super rare":"Super Rare","ultra rare":"Ultra Rare","secret rare":"Secret Rare",legendary:"Legendary",enchanted:"Enchanted"})[a.toLowerCase()]||a}static isHighValueRarity(a){return["mythic","super rare","ultra rare","secret rare","legendary","enchanted"].some(b=>a.toLowerCase().includes(b))}static generateSetTag(a){return({"dominaria united":"DMU","brothers war":"BRO","phyrexia all will be one":"ONE","march of the machine":"MOM","battle for zendikar":"BFZ","sword shield":"SWSH","sun moon":"SM","the first chapter":"TFC"})[a.toLowerCase()]||null}static detectSpecialSets(a){let b=[],c=a.toLowerCase();return c.includes("promo")&&b.push("Promo"),c.includes("prerelease")&&b.push("Prerelease"),c.includes("foil")&&b.push("Foil"),c.includes("alternate art")&&b.push("Alt Art"),c.includes("full art")&&b.push("Full Art"),c.includes("borderless")&&b.push("Borderless"),c.includes("showcase")&&b.push("Showcase"),c.includes("collector")&&b.push("Collector"),b}static normalizeCardType(a){let b=a.toLowerCase();for(let[a,c]of Object.entries({creature:"Creature",instant:"Instant",sorcery:"Sorcery",artifact:"Artifact",enchantment:"Enchantment",planeswalker:"Planeswalker",land:"Land","basic land":"Basic Land",legendary:"Legendary"}))if(b.includes(a))return c;return null}static categorizeCreaturePower(a,b){let c=parseInt(a),d=parseInt(b);if(isNaN(c)||isNaN(d))return null;let e=c+d;return e>=10?"High Power":e>=6?"Mid Power":e>=3?"Low Power":"Utility"}static analyzeManaColor(a){let b=[];return(a.includes("W")||a.includes("white"))&&b.push("White"),(a.includes("U")||a.includes("blue"))&&b.push("Blue"),(a.includes("B")||a.includes("black"))&&b.push("Black"),(a.includes("R")||a.includes("red"))&&b.push("Red"),(a.includes("G")||a.includes("green"))&&b.push("Green"),b.length>1?b.push("Multicolor"):0===b.length&&a.match(/\d+/)&&b.push("Colorless"),b}static normalizeElement(a){return({fire:"Fire",water:"Water",grass:"Grass",electric:"Electric",psychic:"Psychic",fighting:"Fighting",darkness:"Dark",metal:"Steel",fairy:"Fairy",dragon:"Dragon",colorless:"Colorless"})[a.toLowerCase()]||a}static analyzeCardName(a){let b=[],c=a.toLowerCase();return(c.includes("legendary")||this.isLegendaryName(c))&&b.push("Legendary"),(c.includes("foil")||c.includes("holo"))&&b.push("Foil"),(c.includes("ex")||c.includes("gx")||c.includes("vmax"))&&b.push("Special"),b}static isLegendaryName(a){return[/\b(jace|chandra|garruk|liliana|ajani|elspeth|vraska|nissa|gideon|teferi)\b/,/\b(pikachu|charizard|mewtwo|mew|rayquaza|arceus)\b/,/\b(mickey|minnie|donald|goofy|elsa|anna|simba)\b/].some(b=>b.test(a))}}let q=()=>{let a=(0,f.useNavigate)(),[b,c]=(0,e.useState)("mode-selection"),[h,i]=(0,e.useState)(null),[j,k]=(0,e.useState)([]),[l,q]=(0,e.useState)(new Set),[r,s]=(0,e.useState)(!1),[t]=(0,e.useState)([{id:"1",name:"My Collection"},{id:"2",name:"Trade Binder"},{id:"3",name:"Deck Ideas"}]),[u]=(0,e.useState)([{id:"1",name:"Standard Deck"},{id:"2",name:"Commander"},{id:"3",name:"Draft Picks"}]),[v]=(0,e.useState)(new Map);(0,e.useEffect)(()=>()=>{v.forEach(a=>{a.startsWith("blob:")&&URL.revokeObjectURL(a)}),v.clear()},[v]);let w=(0,e.useCallback)(a=>{i(a),c("scanning")},[]),x=(0,e.useCallback)(a=>{let b=p.generateTags(a.cardData),c={...a,autoTags:b.tags};v.set(a.id,a.imageDataUrl),k(a=>[...a,c]),k(a=>a.length>100?(a.slice(0,a.length-100).forEach(a=>{let b=v.get(a.id);b&&b.startsWith("blob:")&&URL.revokeObjectURL(b),v.delete(a.id)}),a.slice(a.length-100)):a)},[v]),y=(0,e.useCallback)(a=>{k(b=>b.filter(b=>b.id!==a)),q(b=>{let c=new Set(b);return c.delete(a),c});let b=v.get(a);b&&b.startsWith("blob:")&&URL.revokeObjectURL(b),v.delete(a)},[v]),z=(0,e.useCallback)(()=>{j.forEach(a=>{let b=v.get(a.id);b&&b.startsWith("blob:")&&URL.revokeObjectURL(b)}),v.clear(),k([]),q(new Set)},[j,v]),A=(0,e.useCallback)((a,b)=>{q(c=>{let d=new Set(c);return b?d.add(a):d.delete(a),d})},[]),B=(0,e.useCallback)(a=>{console.log("Viewing card:",a)},[]),C=(0,e.useCallback)(async(a,b)=>{if(0!==l.size){s(!0);try{console.log("Adding to collection:",{collectionId:a,newCollectionName:b,cards:Array.from(l)}),await new Promise(a=>setTimeout(a,1e3)),alert(`Added ${l.size} cards to ${b||"collection"}`)}catch(a){console.error("Failed to add to collection:",a),alert("Failed to add cards to collection")}finally{s(!1)}}},[l]),D=(0,e.useCallback)(async(a,b)=>{if(0!==l.size){s(!0);try{console.log("Adding to deck:",{deckId:a,newDeckName:b,cards:Array.from(l)}),await new Promise(a=>setTimeout(a,1e3)),alert(`Added ${l.size} cards to ${b||"deck"}`)}catch(a){console.error("Failed to add to deck:",a),alert("Failed to add cards to deck")}finally{s(!1)}}},[l]),E=(0,e.useCallback)(async a=>{if(0!==l.size){s(!0);try{console.log("Adding tags:",{tags:a,cards:Array.from(l)}),await new Promise(a=>setTimeout(a,1e3)),alert(`Added tags "${a.join(", ")}" to ${l.size} cards`)}catch(a){console.error("Failed to add tags:",a),alert("Failed to add tags")}finally{s(!1)}}},[l]),F=(0,e.useCallback)(()=>{l.forEach(a=>y(a))},[l,y]),G=(0,e.useCallback)(async()=>{if(0===j.length)return void a("/scanner");c("processing"),s(!0);try{switch(h){case"add-to-database":console.log("Adding all cards to database:",j);break;case"search-collections":console.log("Searching collections for:",j);break;case"price-check":console.log("Getting prices for:",j);break;case"deck-building":console.log("Adding to deck:",j)}await new Promise(a=>setTimeout(a,2e3)),c("complete"),setTimeout(()=>{a("/scanner")},3e3)}catch(a){console.error("Failed to process cards:",a),alert("Failed to process cards"),c("review")}finally{s(!1)}},[j,h,a]),H=(0,e.useCallback)(()=>{c("scanning")},[]),I=(0,e.useCallback)(()=>{c("review")},[]),J=(0,e.useCallback)(a=>{console.error("Scanner error:",a),alert(a)},[]);return(0,d.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,d.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-6",children:(()=>{switch(b){case"mode-selection":return(0,d.jsx)(g,{onModeSelect:w});case"scanning":return(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsxs)("h2",{className:"text-xl sm:text-2xl font-bold text-gray-900 mb-2",children:["add-to-database"===h&&"\uD83D\uDCDA Adding Cards to Database","search-collections"===h&&"\uD83D\uDD0D Searching Collections","price-check"===h&&"\uD83D\uDCB0 Price Checking Cards","deck-building"===h&&"\uD83C\uDFAF Building Deck"]}),(0,d.jsx)("p",{className:"text-gray-600 text-sm sm:text-base",children:"Position cards clearly within the camera frame"})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[j.length>0&&(0,d.jsx)("button",{onClick:I,className:"w-full sm:w-auto bg-green-600 text-white px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-green-700 active:bg-green-800 transition-colors text-sm sm:text-base shadow-lg",children:(0,d.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,d.jsx)("span",{children:"Review Queue"}),(0,d.jsx)("span",{className:"bg-green-700 px-2 py-0.5 rounded-full text-xs",children:j.length})]})}),(0,d.jsx)("button",{onClick:()=>c("mode-selection"),className:"w-full sm:w-auto bg-gray-100 text-gray-700 px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors text-sm sm:text-base",children:"Change Mode"})]})]})}),(0,d.jsx)(m,{onCardScanned:x,onError:J,isActive:"scanning"===b,maxQueueSize:100})]});case"review":return(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h2",{className:"text-xl sm:text-2xl font-bold text-gray-900 mb-2",children:"Review Scanned Cards"}),(0,d.jsx)("p",{className:"text-gray-600 text-sm sm:text-base",children:"Select cards and choose where to add them"})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,d.jsx)("button",{onClick:H,className:"w-full sm:w-auto bg-blue-600 text-white px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-blue-700 active:bg-blue-800 transition-colors text-sm sm:text-base",children:"Continue Scanning"}),(0,d.jsx)("button",{onClick:G,disabled:0===j.length||r,className:"w-full sm:w-auto bg-green-600 text-white px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-green-700 active:bg-green-800 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors text-sm sm:text-base shadow-lg",children:r?(0,d.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,d.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent"}),(0,d.jsx)("span",{children:"Processing..."})]}):"Finish & Process"})]})]})}),(0,d.jsx)(n,{cards:j,onRemoveCard:y,onClearQueue:z,onCardSelect:A,selectedCards:l,onViewCard:B}),(0,d.jsx)(o,{selectedCount:l.size,onAddToCollection:C,onAddToDeck:D,onAddTags:E,onRemoveSelected:F,collections:t,decks:u,isProcessing:r})]});case"processing":return(0,d.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:(0,d.jsxs)("div",{className:"text-center max-w-md mx-auto",children:[(0,d.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 sm:h-20 sm:w-20 border-4 border-blue-600 border-t-transparent mx-auto mb-6"}),(0,d.jsx)("h3",{className:"text-xl sm:text-2xl font-semibold text-gray-900 mb-3",children:"Processing Cards..."}),(0,d.jsxs)("p",{className:"text-gray-600 text-sm sm:text-base mb-4",children:["Adding ",j.length," cards to your collection"]}),(0,d.jsx)("div",{className:"bg-gray-100 rounded-full h-2 w-full max-w-xs mx-auto",children:(0,d.jsx)("div",{className:"bg-blue-600 h-2 rounded-full animate-pulse",style:{width:"60%"}})})]})});case"complete":return(0,d.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:(0,d.jsxs)("div",{className:"text-center max-w-md mx-auto",children:[(0,d.jsx)("div",{className:"text-6xl sm:text-7xl mb-6",children:"✅"}),(0,d.jsx)("h3",{className:"text-xl sm:text-2xl font-semibold text-green-600 mb-3",children:"Success!"}),(0,d.jsxs)("p",{className:"text-gray-600 text-sm sm:text-base mb-6",children:["Successfully processed ",j.length," cards"]}),(0,d.jsx)("div",{className:"bg-green-50 border border-green-200 rounded-xl p-4 mb-6",children:(0,d.jsx)("p",{className:"text-green-800 text-sm font-medium",children:"\uD83C\uDF89 All cards have been added to your collection!"})}),(0,d.jsx)("p",{className:"text-sm text-gray-500",children:"Redirecting to scanner..."})]})});default:return null}})()})})},r=()=>(0,d.jsx)(q,{})},907:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(8732);c(2015);var e=c(4670),f=c(4822);let g=()=>{let{user:a}=(0,e.A)(),b=[{title:"Collections",value:"0",icon:(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),color:"primary"},{title:"Decks",value:"0",icon:(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),color:"accent"},{title:"Total Cards",value:"0",icon:(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2M7 4H5a2 2 0 00-2 2v10a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2h-2M7 4v6l2-2 2 2V4"})}),color:"primary"},{title:"Total Value",value:"$0",icon:(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1"})}),color:"accent"}],c=[{title:"Scan Cards",description:"Use OCR to quickly add cards",href:"/scanner",icon:(0,d.jsxs)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})]}),gradient:"from-primary-500 to-accent-500"},{title:"Browse Cards",description:"Explore your collection",href:"/cards",icon:(0,d.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),gradient:"from-accent-500 to-primary-500"},{title:"Manage Collections",description:"Organize your cards",href:"/collections",icon:(0,d.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),gradient:"from-primary-600 to-accent-400"}];return(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsxs)("div",{className:"bg-gradient-to-br from-primary-500 via-primary-600 to-accent-500 p-6 rounded-2xl text-white shadow-lg",children:[(0,d.jsxs)("h1",{className:"text-2xl font-bold mb-2",children:["Welcome back, ",a?.firstName||a?.username,"! \uD83D\uDC4B"]}),(0,d.jsx)("p",{className:"text-primary-100",children:"Ready to manage your card collection?"})]}),(0,d.jsx)("div",{className:"grid grid-cols-2 gap-4",children:b.map((a,b)=>(0,d.jsxs)("div",{className:"bg-white dark:bg-surface-800 p-4 rounded-xl shadow-sm border border-surface-200 dark:border-surface-700 transition-colors",children:[(0,d.jsx)("div",{className:`inline-flex items-center justify-center w-10 h-10 rounded-lg mb-3 ${"primary"===a.color?"bg-primary-100 text-primary-600 dark:bg-primary-900/30 dark:text-primary-400":"bg-accent-100 text-accent-600 dark:bg-accent-900/30 dark:text-accent-400"}`,children:a.icon}),(0,d.jsx)("p",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:a.value}),(0,d.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:a.title})]},a.title))}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-surface-900 dark:text-white",children:"Quick Actions"}),c.map((a,b)=>(0,d.jsx)(f.Link,{to:a.href,className:"block bg-white dark:bg-surface-800 p-4 rounded-xl shadow-sm border border-surface-200 dark:border-surface-700 hover:shadow-md transition-all duration-200 active:scale-98",children:(0,d.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,d.jsx)("div",{className:`w-12 h-12 bg-gradient-to-r ${a.gradient} rounded-xl flex items-center justify-center text-white shadow-md`,children:a.icon}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:a.title}),(0,d.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:a.description})]}),(0,d.jsx)("svg",{className:"w-5 h-5 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},a.title))]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-surface-900 dark:text-white",children:"Recent Activity"}),(0,d.jsx)("div",{className:"bg-white dark:bg-surface-800 p-6 rounded-xl shadow-sm border border-surface-200 dark:border-surface-700 transition-colors",children:(0,d.jsxs)("div",{className:"text-center",children:[(0,d.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-4",children:(0,d.jsx)("svg",{className:"w-8 h-8 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}),(0,d.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-4",children:"No recent activity yet"}),(0,d.jsx)("p",{className:"text-sm text-surface-500 dark:text-surface-500",children:"Start by scanning some cards or creating a collection!"})]})})]})]})}},1025:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"warnOnce",{enumerable:!0,get:function(){return c}});let c=a=>{}},1169:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addLocale",{enumerable:!0,get:function(){return d}}),c(7779);let d=function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d{"use strict";function c(){let a=Object.create(null);return{on(b,c){(a[b]||(a[b]=[])).push(c)},off(b,c){a[b]&&a[b].splice(a[b].indexOf(c)>>>0,1)},emit(b){for(var c=arguments.length,d=Array(c>1?c-1:0),e=1;e{a(...d)})}}}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return c}})},1219:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"BloomFilter",{enumerable:!0,get:function(){return d}});class d{static from(a,b){void 0===b&&(b=1e-4);let c=new d(a.length,b);for(let b of a)c.add(b);return c}export(){let a={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};if(this.errorRate<1e-4){let b=JSON.stringify(a),d=c(8550).sync(b);d>1024&&console.warn("Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate "+this.errorRate+" resulted in size "+b.length+" bytes, "+d+" bytes (gzip)")}return a}import(a){this.numItems=a.numItems,this.errorRate=a.errorRate,this.numBits=a.numBits,this.numHashes=a.numHashes,this.bitArray=a.bitArray}add(a){this.getHashValues(a).forEach(a=>{this.bitArray[a]=1})}contains(a){return this.getHashValues(a).every(a=>this.bitArray[a])}getHashValues(a){let b=[];for(let c=1;c<=this.numHashes;c++){let d=function(a){let b=0;for(let c=0;c>>13,b=Math.imul(b,0x5bd1e995);return b>>>0}(""+a+c)%this.numBits;b.push(d)}return b}constructor(a,b=1e-4){this.numItems=a,this.errorRate=b,this.numBits=Math.ceil(-(a*Math.log(b))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/a*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},1484:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{default:function(){return r},handleClientScriptLoad:function(){return o},initScriptLoader:function(){return p}});let d=c(7020),e=c(3147),f=c(8732),g=d._(c(2326)),h=e._(c(2015)),i=c(1523),j=c(8941),k=c(4841),l=new Map,m=new Set,n=a=>{let{src:b,id:c,onLoad:d=()=>{},onReady:e=null,dangerouslySetInnerHTML:f,children:h="",strategy:i="afterInteractive",onError:k,stylesheets:n}=a,o=c||b;if(o&&m.has(o))return;if(l.has(b)){m.add(o),l.get(b).then(d,k);return}let p=()=>{e&&e(),m.add(o)},q=document.createElement("script"),r=new Promise((a,b)=>{q.addEventListener("load",function(b){a(),d&&d.call(this,b),p()}),q.addEventListener("error",function(a){b(a)})}).catch(function(a){k&&k(a)});f?(q.innerHTML=f.__html||"",p()):h?(q.textContent="string"==typeof h?h:Array.isArray(h)?h.join(""):"",p()):b&&(q.src=b,l.set(b,r)),(0,j.setAttributesFromProps)(q,a),"worker"===i&&q.setAttribute("type","text/partytown"),q.setAttribute("data-nscript",i),n&&(a=>{if(g.default.preinit)return a.forEach(a=>{g.default.preinit(a,{as:"style"})})})(n),document.body.appendChild(q)};function o(a){let{strategy:b="afterInteractive"}=a;"lazyOnload"===b?window.addEventListener("load",()=>{(0,k.requestIdleCallback)(()=>n(a))}):n(a)}function p(a){a.forEach(o),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(a=>{let b=a.id||a.getAttribute("src");m.add(b)})}function q(a){let{id:b,src:c="",onLoad:d=()=>{},onReady:e=null,strategy:j="afterInteractive",onError:l,stylesheets:o,...p}=a,{updateScripts:q,scripts:r,getIsSsr:s,appDir:t,nonce:u}=(0,h.useContext)(i.HeadManagerContext);u=p.nonce||u;let v=(0,h.useRef)(!1);(0,h.useEffect)(()=>{let a=b||c;v.current||(e&&a&&m.has(a)&&e(),v.current=!0)},[e,b,c]);let w=(0,h.useRef)(!1);if((0,h.useEffect)(()=>{if(!w.current){if("afterInteractive"===j)n(a);else"lazyOnload"===j&&("complete"===document.readyState?(0,k.requestIdleCallback)(()=>n(a)):window.addEventListener("load",()=>{(0,k.requestIdleCallback)(()=>n(a))}));w.current=!0}},[a,j]),("beforeInteractive"===j||"worker"===j)&&(q?(r[j]=(r[j]||[]).concat([{id:b,src:c,onLoad:d,onReady:e,onError:l,...p,nonce:u}]),q(r)):s&&s()?m.add(b||c):s&&!s()&&n({...a,nonce:u})),t){if(o&&o.forEach(a=>{g.default.preinit(a,{as:"style"})}),"beforeInteractive"===j)if(!c)return p.dangerouslySetInnerHTML&&(p.children=p.dangerouslySetInnerHTML.__html,delete p.dangerouslySetInnerHTML),(0,f.jsx)("script",{nonce:u,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...p,id:b}])+")"}});else return g.default.preload(c,p.integrity?{as:"script",integrity:p.integrity,nonce:u,crossOrigin:p.crossOrigin}:{as:"script",nonce:u,crossOrigin:p.crossOrigin}),(0,f.jsx)("script",{nonce:u,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([c,{...p,id:b}])+")"}});"afterInteractive"===j&&c&&g.default.preload(c,p.integrity?{as:"script",integrity:p.integrity,nonce:u,crossOrigin:p.crossOrigin}:{as:"script",nonce:u,crossOrigin:p.crossOrigin})}return null}Object.defineProperty(q,"__nextScript",{value:!0});let r=q;("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},1523:(a,b,c)=>{"use strict";a.exports=c(3885).vendored.contexts.HeadManagerContext},1735:(a,b,c)=>{"use strict";c.d(b,{Ay:()=>p});let d="https://api.scryfall.com",e="https://api.lorcast.com/v0",f="https://api.lorcana-api.com",g="https://tcg-vault.vercel.app/api/proxy/lorcana";class h{constructor(a,b){this.requests=[],this.maxRequests=a,this.timeWindow=b}async waitForSlot(){let a=Date.now();if(this.requests=this.requests.filter(b=>a-b=this.maxRequests){let b=this.requests[0],c=this.timeWindow-(a-b);await new Promise(a=>setTimeout(a,c))}this.requests.push(a)}}let i=new h(10,1e3),j=new h(5,1e3),k=new h(10,1e3),l={async searchCards(a,b=1){await i.waitForSlot();try{let c=await fetch(`${d}/cards/search?q=${encodeURIComponent(a)}&page=${b}`);if(!c.ok)throw Error(`Scryfall API error: ${c.status}`);return(await c.json()).data.map(a=>({id:a.id,name:a.name,set_name:a.set_name,set_code:a.set,card_number:a.collector_number,rarity:a.rarity,game:"MTG",mana_cost:a.mana_cost,cmc:a.cmc,card_type:a.type_line,colors:a.colors,oracle_text:a.oracle_text,power:a.power,toughness:a.toughness,image_url:a.image_uris?.normal,stock_image_url:a.image_uris?.normal,current_price:a.prices?.usd?parseFloat(a.prices.usd):void 0,market_price:a.prices?.usd_foil?parseFloat(a.prices.usd_foil):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(a){return console.error("Error fetching MTG cards:",a),[]}},async getCardByName(a){await i.waitForSlot();try{let b=await fetch(`${d}/cards/named?fuzzy=${encodeURIComponent(a)}`);if(!b.ok)return null;let c=await b.json();return{id:c.id,name:c.name,set_name:c.set_name,set_code:c.set,card_number:c.collector_number,rarity:c.rarity,game:"MTG",mana_cost:c.mana_cost,cmc:c.cmc,card_type:c.type_line,colors:c.colors,oracle_text:c.oracle_text,power:c.power,toughness:c.toughness,image_url:c.image_uris?.normal,stock_image_url:c.image_uris?.normal,current_price:c.prices?.usd?parseFloat(c.prices.usd):void 0,market_price:c.prices?.usd_foil?parseFloat(c.prices.usd_foil):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}catch(a){return console.error("Error fetching MTG card:",a),null}},async getRandomCards(a=20){await i.waitForSlot();try{let b=await fetch(`${d}/cards/random?q=game:paper&page_size=${a}`);if(!b.ok)throw Error(`Scryfall API error: ${b.status}`);let c=await b.json();return(Array.isArray(c)?c:[c]).map(a=>({id:a.id,name:a.name,set_name:a.set_name,set_code:a.set,card_number:a.collector_number,rarity:a.rarity,game:"MTG",mana_cost:a.mana_cost,cmc:a.cmc,card_type:a.type_line,colors:a.colors,oracle_text:a.oracle_text,power:a.power,toughness:a.toughness,image_url:a.image_uris?.normal,stock_image_url:a.image_uris?.normal,current_price:a.prices?.usd?parseFloat(a.prices.usd):void 0,market_price:a.prices?.usd_foil?parseFloat(a.prices.usd_foil):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(a){return console.error("Error fetching random MTG cards:",a),[]}}},m={async searchCards(a,b=1){await j.waitForSlot();try{let c=await fetch(`https://api.pokemontcg.io/v2/cards?q=name:${encodeURIComponent(a)}&page=${b}&pageSize=20`);if(!c.ok)throw Error(`Pok\xe9mon API error: ${c.status}`);return(await c.json()).data.map(a=>({id:a.id,name:a.name,set_name:a.set.name,set_code:a.set.id,card_number:a.number,rarity:a.rarity,game:"POKEMON",mana_cost:a.convertedRetreatCost?.toString(),cmc:a.convertedRetreatCost,card_type:a.supertype,colors:a.types||[],oracle_text:a.attacks?.map(a=>`${a.name}: ${a.text}`).join("\n"),power:a.hp,toughness:null,image_url:a.images.small,stock_image_url:a.images.large,current_price:a.cardmarket?.prices?.averageSellPrice||void 0,market_price:a.cardmarket?.prices?.lowPrice||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(a){return console.error("Error fetching Pok\xe9mon cards:",a),[]}},async getCardByName(a){let b=await this.searchCards(a,1);return b.length>0?b[0]:null}},n={async searchCards(a){try{let b=await fetch(`https://db.ygoprodeck.com/api/v7/cardinfo.php?fname=${encodeURIComponent(a)}`);if(!b.ok)throw Error(`Yu-Gi-Oh! API error: ${b.status}`);return(await b.json()).data.map(a=>({id:a.id,name:a.name,set_name:a.set_name,set_code:a.set_code,card_number:a.num,rarity:a.rarity,game:"YUGIOH",mana_cost:a.level?.toString(),cmc:a.level,card_type:a.type,colors:[a.attribute],oracle_text:a.desc,power:a.atk?.toString(),toughness:a.def?.toString(),image_url:a.card_images?.[0]?.image_url,stock_image_url:a.card_images?.[0]?.image_url_small,current_price:a.card_prices?.[0]?.amazon_price?parseFloat(a.card_prices[0].amazon_price):void 0,market_price:a.card_prices?.[0]?.cardmarket_price?parseFloat(a.card_prices[0].cardmarket_price):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(a){return console.error("Error fetching Yu-Gi-Oh! cards:",a),[]}},async getCardByName(a){let b=await this.searchCards(a);return b.length>0?b[0]:null}},o={async searchCards(a){await k.waitForSlot();try{try{let b=await fetch(`${g}?search=${encodeURIComponent(a)}&api=lorcana`);if(b.ok){let a=await b.json();if(console.log("\uD83D\uDD0D Proxy API response:",JSON.stringify(a,null,2)),a.success&&a.data){let b=a.data.cards||a.data.data||a.data||[];if(b.length>0)return console.log(`✅ Found ${b.length} Lorcana cards via proxy (${a.source})`),console.log("\uD83D\uDD0D First card structure:",JSON.stringify(b[0],null,2)),b.map(a=>({id:a.id||a.uuid||a.card_id||`lorcana-${Math.random()}`,name:a.name||a.card_name||a.title||"",set_name:a.set?.name||a.set_name||a.set_name||"",set_code:a.set?.code||a.set_code||a.set_code||"",card_number:a.number||a.card_number||a.card_num||"",rarity:a.rarity||a.rarity_name||"",game:"LORCANA",mana_cost:a.cost?.toString()||a.mana_cost||a.ink_cost?.toString()||"",cmc:a.cost||a.cmc||a.ink_cost||0,card_type:a.type||a.card_type||a.type_name||"",colors:a.colors||a.ink||[],oracle_text:a.text||a.oracle_text||a.description||a.effect||"",power:a.strength?.toString()||a.power||a.attack?.toString()||"",toughness:a.willpower?.toString()||a.toughness||a.defense?.toString()||"",image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",stock_image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",current_price:a.price?.market||a.current_price||void 0,market_price:a.price?.low||a.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}}catch(a){console.log("❌ Proxy API failed, trying direct APIs")}try{let b=await fetch(`${f}/cards/fetch?search=name~${encodeURIComponent(a)}`);if(b.ok){let a=await b.json();console.log("\uD83D\uDD0D Direct API response:",JSON.stringify(a,null,2));let c=a.cards||a.data||a||[];if(c.length>0)return console.log(`✅ Found ${c.length} Lorcana cards from direct Lorcana API`),console.log("\uD83D\uDD0D First card structure:",JSON.stringify(c[0],null,2)),c.map(a=>({id:a.id||a.uuid||a.card_id||`lorcana-${Math.random()}`,name:a.name||a.card_name||a.title||"",set_name:a.set?.name||a.set_name||a.set_name||"",set_code:a.set?.code||a.set_code||a.set_code||"",card_number:a.number||a.card_number||a.card_num||"",rarity:a.rarity||a.rarity_name||"",game:"LORCANA",mana_cost:a.cost?.toString()||a.mana_cost||a.ink_cost?.toString()||"",cmc:a.cost||a.cmc||a.ink_cost||0,card_type:a.type||a.card_type||a.type_name||"",colors:a.colors||a.ink||[],oracle_text:a.text||a.oracle_text||a.description||a.effect||"",power:a.strength?.toString()||a.power||a.attack?.toString()||"",toughness:a.willpower?.toString()||a.toughness||a.defense?.toString()||"",image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",stock_image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",current_price:a.price?.market||a.current_price||void 0,market_price:a.price?.low||a.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}catch(a){console.log("❌ Direct Lorcana API failed")}for(let b of[`/cards?q=${encodeURIComponent(a)}`,`/cards?search=${encodeURIComponent(a)}`,`/cards?query=${encodeURIComponent(a)}`])try{let a=await fetch(`${e}${b}`);if(a.ok){let c=await a.json();console.log(`🔍 Lorcast API response from ${b}:`,JSON.stringify(c,null,2));let d=c.cards||c.data||c||[];if(d.length>0)return console.log(`✅ Found ${d.length} Lorcana cards from Lorcast ${b}`),console.log("\uD83D\uDD0D First card structure:",JSON.stringify(d[0],null,2)),d.map(a=>({id:a.id||a.uuid||a.card_id||`lorcana-${Math.random()}`,name:a.name||a.card_name||a.title||"",set_name:a.set?.name||a.set_name||a.set_name||"",set_code:a.set?.code||a.set_code||a.set_code||"",card_number:a.number||a.card_number||a.card_num||"",rarity:a.rarity||a.rarity_name||"",game:"LORCANA",mana_cost:a.cost?.toString()||a.mana_cost||a.ink_cost?.toString()||"",cmc:a.cost||a.cmc||a.ink_cost||0,card_type:a.type||a.card_type||a.type_name||"",colors:a.colors||a.ink||[],oracle_text:a.text||a.oracle_text||a.description||a.effect||"",power:a.strength?.toString()||a.power||a.attack?.toString()||"",toughness:a.willpower?.toString()||a.toughness||a.defense?.toString()||"",image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",stock_image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",current_price:a.price?.market||a.current_price||void 0,market_price:a.price?.low||a.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}catch(a){console.log(`❌ Failed to search from Lorcast ${b}:`,a);continue}return console.log("⚠️ No Lorcana cards found from any API"),[]}catch(a){return console.error("Error searching Lorcana cards:",a),[]}},async getCardByName(a){await k.waitForSlot();try{try{let b=await fetch(`${g}?search=${encodeURIComponent(a)}&api=lorcana`);if(b.ok){let c=await b.json();if(c.success&&c.data){let b=c.data.cards||c.data.data||c.data||[];if(b.length>0){let d=b[0];return console.log(`✅ Found Lorcana card "${a}" via proxy (${c.source})`),{id:d.id||d.uuid||d.card_id||`lorcana-${Math.random()}`,name:d.name||d.card_name||d.title||"",set_name:d.set?.name||d.set_name||d.set_name||"",set_code:d.set?.code||d.set_code||d.set_code||"",card_number:d.number||d.card_number||d.card_num||"",rarity:d.rarity||d.rarity_name||"",game:"LORCANA",mana_cost:d.cost?.toString()||d.mana_cost||d.ink_cost?.toString()||"",cmc:d.cost||d.cmc||d.ink_cost||0,card_type:d.type||d.card_type||d.type_name||"",colors:d.colors||d.ink||[],oracle_text:d.text||d.oracle_text||d.description||d.effect||"",power:d.strength?.toString()||d.power||d.attack?.toString()||"",toughness:d.willpower?.toString()||d.toughness||d.defense?.toString()||"",image_url:d.image_url||d.images?.small||d.images?.png||d.image||"",stock_image_url:d.image_url||d.images?.small||d.images?.png||d.image||"",current_price:d.price?.market||d.current_price||void 0,market_price:d.price?.low||d.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}}}}catch(a){console.log("❌ Proxy API failed for card lookup, trying direct APIs")}try{let b=await fetch(`${f}/cards/fetch?search=name~${encodeURIComponent(a)}`);if(b.ok){let c=await b.json(),d=c.cards||c.data||c||[];if(d.length>0){let b=d[0];return console.log(`✅ Found Lorcana card "${a}" from direct Lorcana API`),{id:b.id||b.uuid||b.card_id||`lorcana-${Math.random()}`,name:b.name||b.card_name||b.title||"",set_name:b.set?.name||b.set_name||b.set_name||"",set_code:b.set?.code||b.set_code||b.set_code||"",card_number:b.number||b.card_number||b.card_num||"",rarity:b.rarity||b.rarity_name||"",game:"LORCANA",mana_cost:b.cost?.toString()||b.mana_cost||b.ink_cost?.toString()||"",cmc:b.cost||b.cmc||b.ink_cost||0,card_type:b.type||b.card_type||b.type_name||"",colors:b.colors||b.ink||[],oracle_text:b.text||b.oracle_text||b.description||b.effect||"",power:b.strength?.toString()||b.power||b.attack?.toString()||"",toughness:b.willpower?.toString()||b.toughness||b.defense?.toString()||"",image_url:b.image_url||b.images?.small||b.images?.png||b.image||"",stock_image_url:b.image_url||b.images?.small||b.images?.png||b.image||"",current_price:b.price?.market||b.current_price||void 0,market_price:b.price?.low||b.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}}}catch(a){console.log("❌ Direct Lorcana API failed for card lookup")}for(let b of[`/cards?q=name:${encodeURIComponent(a)}`,`/cards?search=${encodeURIComponent(a)}`,`/cards?query=${encodeURIComponent(a)}`])try{let c=await fetch(`${e}${b}`);if(c.ok){let d=await c.json(),e=d.cards||d.data||d||[];if(e.length>0){let c=e[0];return console.log(`✅ Found Lorcana card "${a}" from Lorcast ${b}`),{id:c.id||c.uuid||c.card_id||`lorcana-${Math.random()}`,name:c.name||c.card_name||c.title||"",set_name:c.set?.name||c.set_name||c.set_name||"",set_code:c.set?.code||c.set_code||c.set_code||"",card_number:c.number||c.card_number||c.card_num||"",rarity:c.rarity||c.rarity_name||"",game:"LORCANA",mana_cost:c.cost?.toString()||c.mana_cost||c.ink_cost?.toString()||"",cmc:c.cost||c.cmc||c.ink_cost||0,card_type:c.type||c.card_type||c.type_name||"",colors:c.colors||c.ink||[],oracle_text:c.text||c.oracle_text||c.description||c.effect||"",power:c.strength?.toString()||c.power||c.attack?.toString()||"",toughness:c.willpower?.toString()||c.toughness||c.defense?.toString()||"",image_url:c.image_url||c.images?.small||c.images?.png||c.image||"",stock_image_url:c.image_url||c.images?.small||c.images?.png||c.image||"",current_price:c.price?.market||c.current_price||void 0,market_price:c.price?.low||c.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}}}catch(a){console.log(`❌ Failed to fetch card from Lorcast ${b}:`,a);continue}return console.log(`⚠️ Lorcana card "${a}" not found from any API`),null}catch(a){return console.error("Error fetching Lorcana card:",a),null}},async getRandomCards(a=20){await k.waitForSlot();try{try{let b=await fetch(`${g}?limit=${a}&api=lorcana`);if(b.ok){let c=await b.json();if(c.success&&c.data){let b=c.data.cards||c.data.data||c.data||[];if(b.length>0)return console.log(`✅ Found ${b.length} cards via proxy (${c.source})`),b.sort(()=>.5-Math.random()).slice(0,a).map(a=>({id:a.id||a.uuid||`lorcana-${Math.random()}`,name:a.name,set_name:a.set?.name||a.set_name||"",set_code:a.set?.code||a.set_code||"",card_number:a.number||a.card_number||"",rarity:a.rarity,game:"LORCANA",mana_cost:a.cost?.toString()||a.mana_cost,cmc:a.cost||a.cmc,card_type:a.type||a.card_type,colors:a.colors||[],oracle_text:a.text||a.oracle_text||"",power:a.strength?.toString()||a.power,toughness:a.willpower?.toString()||a.toughness,image_url:a.image_url||a.images?.small||a.images?.png,stock_image_url:a.image_url||a.images?.small||a.images?.png,current_price:a.price?.market||a.current_price||void 0,market_price:a.price?.low||a.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}}catch(a){console.log("❌ Proxy API failed for random cards, trying direct APIs")}try{let b=await fetch(`${f}/cards/fetch?pagesize=${a}`);if(b.ok){let c=await b.json(),d=c.cards||c.data||c||[];if(d.length>0)return console.log(`✅ Found ${d.length} cards from direct Lorcana API`),d.sort(()=>.5-Math.random()).slice(0,a).map(a=>({id:a.id||a.uuid||`lorcana-${Math.random()}`,name:a.name,set_name:a.set?.name||a.set_name||"",set_code:a.set?.code||a.set_code||"",card_number:a.number||a.card_number||"",rarity:a.rarity,game:"LORCANA",mana_cost:a.cost?.toString()||a.mana_cost,cmc:a.cost||a.cmc,card_type:a.type||a.card_type,colors:a.colors||[],oracle_text:a.text||a.oracle_text||"",power:a.strength?.toString()||a.power,toughness:a.willpower?.toString()||a.toughness,image_url:a.image_url||a.images?.small||a.images?.png,stock_image_url:a.image_url||a.images?.small||a.images?.png,current_price:a.price?.market||a.current_price||void 0,market_price:a.price?.low||a.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}catch(a){console.log("❌ Direct Lorcana API failed for random cards")}let b=[];for(let a of["/cards","/api/cards","/v0/cards"])try{let c=await fetch(`${e}${a}`);if(c.ok){let d=await c.json();b=d.cards||d.data||d||[],console.log(`✅ Found ${b.length} cards from Lorcast ${a}`);break}}catch(b){console.log(`❌ Failed to fetch from Lorcast ${a}:`,b);continue}if(0===b.length)return console.log("⚠️ No cards found from any endpoint, returning empty array"),[];return b.sort(()=>.5-Math.random()).slice(0,a).map(a=>({id:a.id||a.uuid||`lorcana-${Math.random()}`,name:a.name,set_name:a.set?.name||a.set_name||"",set_code:a.set?.code||a.set_code||"",card_number:a.number||a.card_number||"",rarity:a.rarity,game:"LORCANA",mana_cost:a.cost?.toString()||a.mana_cost,cmc:a.cost||a.cmc,card_type:a.type||a.card_type,colors:a.colors||[],oracle_text:a.text||a.oracle_text||"",power:a.strength?.toString()||a.power,toughness:a.willpower?.toString()||a.toughness,image_url:a.image_url||a.images?.small||a.images?.png,stock_image_url:a.image_url||a.images?.small||a.images?.png,current_price:a.price?.market||a.current_price||void 0,market_price:a.price?.low||a.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(a){return console.error("Error fetching random Lorcana cards:",a),[]}}},p={async searchCards(a,b){console.log(`🔍 Database search: "${a}" for game: "${b}"`);try{let c=new URLSearchParams({q:a,limit:"50"});b&&"ALL"!==b&&c.append("game",b);let d=await fetch(`https://tcg-vault.vercel.app/api/cards?${c}`);if(!d.ok)throw Error(`Database search failed: ${d.status}`);let e=await d.json();if(e.success&&e.data)return console.log(`✅ Found ${e.data.length} cards from database`),e.data.map(a=>({id:a.id,name:a.name,set_name:a.set_name,set_code:a.set_code,card_number:a.card_number,rarity:a.rarity,game:a.game,mana_cost:a.mana_cost,cmc:a.cmc,card_type:a.card_type,colors:a.colors||[],oracle_text:a.oracle_text,power:a.power,toughness:a.toughness,image_url:a.image_url,stock_image_url:a.stock_image_url,current_price:a.current_price,market_price:a.market_price,verified:a.verified,createdAt:a.createdAt,updatedAt:a.updatedAt}));return[]}catch(a){return console.error("Error in database card search:",a),[]}},async getCardByName(a,b){try{if("MTG"===b)return await l.getCardByName(a);if("POKEMON"===b)return await m.getCardByName(a);if("YUGIOH"===b)return await n.getCardByName(a);if("LORCANA"===b)return await o.getCardByName(a);let c=await l.getCardByName(a);if(c)return c;let d=await m.getCardByName(a);if(d)return d;let e=await n.getCardByName(a);if(e)return e;let f=await o.getCardByName(a);if(f)return f;return null}catch(a){return console.error("Error in unified card search by name:",a),null}},async getRandomCards(a=20,b){let c=[];console.log(`🎲 Getting ${a} random cards for game: "${b}"`);try{if(!b||"MTG"===b){console.log("\uD83C\uDFB2 Getting random MTG cards...");let b=await l.getRandomCards(Math.ceil(a/4));console.log(`✅ Found ${b.length} random MTG cards`),c.push(...b)}if(!b||"LORCANA"===b){console.log("\uD83C\uDFB2 Getting random Lorcana cards...");let b=await o.getRandomCards(Math.ceil(a/4));console.log(`✅ Found ${b.length} random Lorcana cards`),c.push(...b)}let d=c.slice(0,a);return console.log(`🎯 Returning ${d.length} random cards`),d}catch(a){return console.error("Error getting random cards:",a),[]}}}},1862:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>j});var e=c(8732),f=c(2015),g=c(8462),h=c(6659),i=a([g,h]);[g,h]=i.then?(await i)():i;let j=({isOpen:a,onClose:b,cardId:c,initialCardData:d})=>{let i=(0,g.useQueryClient)(),[j,k]=(0,f.useState)({cardId:d?.id||"",status:"owned",quantity:1,condition:"near_mint",notes:"",tags:[],collectionIds:[],deckIds:[]}),[l,m]=(0,f.useState)([]),[n,o]=(0,f.useState)([]),{data:p}=(0,g.useQuery)({queryKey:["user-card",c],queryFn:()=>h.LO.cards.getUserCard(c),enabled:!!c}),{data:q}=(0,g.useQuery)({queryKey:["card-info",j.cardId],queryFn:()=>h.LO.cards.getCard(j.cardId),enabled:!!j.cardId}),{data:r=[]}=(0,g.useQuery)({queryKey:["tags"],queryFn:()=>h.LO.tags.getTags()}),{data:s=[]}=(0,g.useQuery)({queryKey:["collections"],queryFn:()=>h.LO.collections.getCollections()}),t=(0,g.useMutation)({mutationFn:h.LO.cards.addCard,onSuccess:()=>{i.invalidateQueries({queryKey:["user-cards"]}),i.invalidateQueries({queryKey:["collections"]}),b()}}),u=(0,g.useMutation)({mutationFn:({id:a,data:b})=>h.LO.cards.updateCard(a,b),onSuccess:()=>{i.invalidateQueries({queryKey:["user-cards"]}),i.invalidateQueries({queryKey:["user-card",c]}),b()}});(0,f.useEffect)(()=>{p&&(k({cardId:p.cardId,status:p.status,quantity:p.quantity,condition:p.condition||"near_mint",notes:p.notes||"",tags:p.tags,collectionIds:p.collectionIds}),m(p.tags),o(p.collectionIds))},[p]);let v=async a=>{a.preventDefault();let b={...j,tags:l,collectionIds:n};c&&p?u.mutate({id:c,data:b}):t.mutate(b)};return a?(0,e.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:b,children:(0,e.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl max-h-[90vh] overflow-hidden animate-slide-up",children:(0,e.jsxs)("div",{className:"p-6",children:[(0,e.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,e.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:c?"Edit Card":"Add Card"}),(0,e.jsx)("button",{onClick:b,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,e.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,e.jsxs)("div",{className:"max-h-[calc(90vh-8rem)] overflow-y-auto",children:[q&&(0,e.jsx)("div",{className:"mb-6 p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:(0,e.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,e.jsx)("div",{className:"w-16 h-20 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center",children:q.image_url?(0,e.jsx)("img",{src:q.image_url,alt:q.name,className:"w-full h-full object-cover rounded-lg"}):(0,e.jsx)("svg",{className:"w-6 h-6 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsxs)("div",{className:"flex-1",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:q.name}),(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:q.set_name}),(0,e.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[(0,e.jsx)("span",{className:"px-2 py-1 bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 rounded-full text-xs font-medium",children:q.game}),(0,e.jsx)("span",{className:"px-2 py-1 bg-accent-100 dark:bg-accent-900/30 text-accent-700 dark:text-accent-300 rounded-full text-xs font-medium",children:q.rarity})]})]})]})}),(0,e.jsxs)("form",{onSubmit:v,className:"space-y-6",onClick:a=>a.stopPropagation(),children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-3",children:"Ownership Status"}),(0,e.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,e.jsx)("button",{type:"button",onClick:()=>k(a=>({...a,status:"owned"})),className:`p-4 rounded-xl border-2 transition-all ${"owned"===j.status?"border-primary-500 bg-primary-50 dark:bg-primary-900/20":"border-surface-200 dark:border-surface-700"}`,children:(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl mb-2",children:"✅"}),(0,e.jsx)("div",{className:"font-medium text-surface-900 dark:text-white",children:"Owned"}),(0,e.jsx)("div",{className:"text-sm text-surface-600 dark:text-surface-400",children:"Cards you own"})]})}),(0,e.jsx)("button",{type:"button",onClick:()=>k(a=>({...a,status:"wanted"})),className:`p-4 rounded-xl border-2 transition-all ${"wanted"===j.status?"border-accent-500 bg-accent-50 dark:bg-accent-900/20":"border-surface-200 dark:border-surface-700"}`,children:(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl mb-2",children:"❤️"}),(0,e.jsx)("div",{className:"font-medium text-surface-900 dark:text-white",children:"Wanted"}),(0,e.jsx)("div",{className:"text-sm text-surface-600 dark:text-surface-400",children:"Wishlist cards"})]})})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Quantity"}),(0,e.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,e.jsx)("button",{type:"button",onClick:()=>k(a=>({...a,quantity:Math.max(1,a.quantity-1)})),className:"w-10 h-10 bg-surface-100 dark:bg-surface-700 rounded-lg flex items-center justify-center text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 12H4"})})}),(0,e.jsx)("span",{className:"text-xl font-semibold text-surface-900 dark:text-white min-w-[3rem] text-center",children:j.quantity}),(0,e.jsx)("button",{type:"button",onClick:()=>k(a=>({...a,quantity:a.quantity+1})),className:"w-10 h-10 bg-surface-100 dark:bg-surface-700 rounded-lg flex items-center justify-center text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]})]}),"owned"===j.status&&(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Condition"}),(0,e.jsxs)("select",{value:j.condition,onChange:a=>k(b=>({...b,condition:a.target.value})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,e.jsx)("option",{value:"mint",children:"Mint (M)"}),(0,e.jsx)("option",{value:"near_mint",children:"Near Mint (NM)"}),(0,e.jsx)("option",{value:"excellent",children:"Excellent (EX)"}),(0,e.jsx)("option",{value:"good",children:"Good (G)"}),(0,e.jsx)("option",{value:"light_played",children:"Light Played (LP)"}),(0,e.jsx)("option",{value:"played",children:"Played (P)"}),(0,e.jsx)("option",{value:"poor",children:"Poor (PO)"})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Tags"}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(a=>(0,e.jsx)("button",{type:"button",onClick:()=>{m(b=>b.includes(a.id)?b.filter(b=>b!==a.id):[...b,a.id])},className:`px-3 py-2 rounded-full text-sm font-medium transition-colors ${l.includes(a.id)?"text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,style:{backgroundColor:l.includes(a.id)?a.color:void 0},children:a.name},a.id))})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Collections"}),(0,e.jsx)("div",{className:"space-y-2 max-h-32 overflow-y-auto",children:s.map(a=>(0,e.jsxs)("label",{className:"flex items-center space-x-3",children:[(0,e.jsx)("input",{type:"checkbox",checked:n.includes(a.id),onChange:b=>{o(c=>b.target.checked?[...c,a.id]:c.filter(b=>b!==a.id))},className:"w-4 h-4 text-primary-600 bg-surface-50 border-surface-300 rounded focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-surface-800 dark:bg-surface-700 dark:border-surface-600"}),(0,e.jsx)("span",{className:"text-sm text-surface-700 dark:text-surface-300",children:a.name})]},a.id))})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Notes"}),(0,e.jsx)("textarea",{value:j.notes,onChange:a=>k(b=>({...b,notes:a.target.value})),rows:3,placeholder:"Add any notes about this card...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors resize-none"})]}),(0,e.jsx)("button",{type:"submit",disabled:!j.cardId||t.isPending||u.isPending,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:t.isPending||u.isPending?(0,e.jsxs)("div",{className:"flex items-center justify-center",children:[(0,e.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,e.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,e.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),c?"Updating...":"Adding..."]}):c?"Update Card":"Add Card"})]})]})]})})}):null};d()}catch(a){d(a)}})},1918:(a,b)=>{"use strict";function c(a){return"/api"===a||!!(null==a?void 0:a.startsWith("/api/"))}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isAPIRoute",{enumerable:!0,get:function(){return c}})},2088:(a,b,c)=>{"use strict";a.exports=c(3885).vendored.contexts.RouterContext},2417:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getRouteMatcher",{enumerable:!0,get:function(){return e}});let d=c(4718);function e(a){let{re:b,groups:c}=a;return a=>{let e=b.exec(a);if(!e)return!1;let f=a=>{try{return decodeURIComponent(a)}catch(a){throw Object.defineProperty(new d.DecodeError("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},g={};for(let[a,b]of Object.entries(c)){let c=e[b.pos];void 0!==c&&(b.repeat?g[a]=c.split("/").map(a=>f(a)):g[a]=f(c))}return g}}},2848:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{formatUrl:function(){return f},formatWithValidation:function(){return h},urlObjectKeys:function(){return g}});let d=c(3147)._(c(7536)),e=/https?|ftp|gopher|file/;function f(a){let{auth:b,hostname:c}=a,f=a.protocol||"",g=a.pathname||"",h=a.hash||"",i=a.query||"",j=!1;b=b?encodeURIComponent(b).replace(/%3A/i,":")+"@":"",a.host?j=b+a.host:c&&(j=b+(~c.indexOf(":")?"["+c+"]":c),a.port&&(j+=":"+a.port)),i&&"object"==typeof i&&(i=String(d.urlQueryToSearchParams(i)));let k=a.search||i&&"?"+i||"";return f&&!f.endsWith(":")&&(f+=":"),a.slashes||(!f||e.test(f))&&!1!==j?(j="//"+(j||""),g&&"/"!==g[0]&&(g="/"+g)):j||(j=""),h&&"#"!==h[0]&&(h="#"+h),k&&"?"!==k[0]&&(k="?"+k),""+f+j+(g=g.replace(/[?#]/g,encodeURIComponent))+(k=k.replace("#","%23"))+h}let g=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function h(a){return f(a)}},3147:(a,b)=>{"use strict";function c(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,d=new WeakMap;return(c=function(a){return a?d:b})(a)}b._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var d=c(b);if(d&&d.has(a))return d.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,d&&d.set(a,e),e}},3448:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"detectDomainLocale",{enumerable:!0,get:function(){return c}});let c=function(){for(var a=arguments.length,b=Array(a),c=0;c{"use strict";c.d(b,{A:()=>i});var d=c(8732),e=c(2015),f=c(4822),g=c(4670),h=c(5533);let i=({children:a})=>{let{user:b,logout:c,isAdmin:i}=(0,g.A)(),{toggleTheme:j,effectiveTheme:k}=(0,h.DP)(),l=(0,f.useLocation)(),m=(0,f.useNavigate)(),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(!1),r=()=>{c(),o(!1),q(!1),m("/login")},s=[{name:"Dashboard",href:"/dashboard",icon:"\uD83D\uDCCA",mobileIcon:"\uD83C\uDFE0"},{name:"Cards",href:"/cards",icon:"\uD83C\uDCCF",mobileIcon:"\uD83C\uDCCF"},{name:"Collections",href:"/collections",icon:"\uD83D\uDCDA",mobileIcon:"\uD83D\uDCDA"},{name:"Decks",href:"/decks",icon:"\uD83C\uDFAF",mobileIcon:"\uD83C\uDFAF"},{name:"Scanner",href:"/scanner",icon:"\uD83D\uDCF7",mobileIcon:"\uD83D\uDCF7"}];return(0,d.jsxs)("div",{className:"min-h-screen bg-surface-50 dark:bg-surface-900 transition-colors",children:[(0,d.jsxs)("div",{className:"hidden lg:flex h-screen",children:[(0,d.jsxs)("div",{className:"w-64 bg-white dark:bg-surface-800 border-r border-surface-200 dark:border-surface-700 flex flex-col",children:[(0,d.jsx)("div",{className:"p-6 border-b border-surface-200 dark:border-surface-700",children:(0,d.jsxs)(f.Link,{to:"/dashboard",className:"flex items-center space-x-3",children:[(0,d.jsx)("div",{className:"bg-gradient-to-r from-primary-500 to-accent-500 text-white p-3 rounded-xl",children:(0,d.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"TCG Vault"}),(0,d.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:["Hi, ",b?.firstName||b?.username]})]})]})}),(0,d.jsx)("nav",{className:"flex-1 p-4 space-y-2",children:s.map(a=>{let b;return(0,d.jsxs)(f.Link,{to:a.href,className:`flex items-center space-x-3 px-4 py-3 rounded-xl text-sm font-medium transition-all duration-200 ${(b=a.href,l.pathname===b)?"bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white hover:bg-surface-100 dark:hover:bg-surface-700"}`,children:[(0,d.jsx)("span",{className:"text-lg",children:a.icon}),(0,d.jsx)("span",{children:a.name})]},a.name)})}),(0,d.jsxs)("div",{className:"p-4 border-t border-surface-200 dark:border-surface-700",children:[(0,d.jsxs)("div",{className:"flex items-center space-x-3 p-3 rounded-xl bg-surface-50 dark:bg-surface-700",children:[(0,d.jsx)("div",{className:"w-10 h-10 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold",children:b?.firstName?.[0]||b?.username?.[0]?.toUpperCase()||"U"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium text-surface-900 dark:text-white truncate",children:b?.firstName&&b?.lastName?`${b.firstName} ${b.lastName}`:b?.username}),(0,d.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 truncate",children:b?.email})]}),(0,d.jsx)("button",{onClick:()=>o(!n),className:"p-1 rounded-lg hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:(0,d.jsx)("svg",{className:"w-4 h-4 text-surface-600 dark:text-surface-400",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),n&&(0,d.jsx)("div",{className:"absolute bottom-20 left-4 w-56 bg-white dark:bg-surface-800 rounded-xl shadow-lg ring-1 ring-black ring-opacity-5 border border-surface-200 dark:border-surface-700",children:(0,d.jsxs)("div",{className:"py-2",children:[(0,d.jsxs)(f.Link,{to:"/settings",onClick:()=>o(!1),className:"flex items-center space-x-3 px-4 py-2 text-sm text-surface-700 dark:text-surface-300 hover:bg-surface-100 dark:hover:bg-surface-700",children:[(0,d.jsx)("span",{children:"⚙️"}),(0,d.jsx)("span",{children:"Settings"})]}),i()&&(0,d.jsxs)(f.Link,{to:"/admin",onClick:()=>o(!1),className:"flex items-center space-x-3 px-4 py-2 text-sm text-yellow-700 dark:text-yellow-300 hover:bg-yellow-50 dark:hover:bg-yellow-900/20",children:[(0,d.jsx)("span",{children:"\uD83D\uDC51"}),(0,d.jsx)("span",{children:"Admin Panel"})]}),(0,d.jsx)("div",{className:"border-t border-surface-200 dark:border-surface-700 my-1"}),(0,d.jsxs)("button",{onClick:r,className:"flex items-center space-x-3 px-4 py-2 text-sm text-red-700 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 w-full text-left",children:[(0,d.jsx)("span",{children:"\uD83D\uDEAA"}),(0,d.jsx)("span",{children:"Sign Out"})]})]})})]})]}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,d.jsx)("header",{className:"bg-white dark:bg-surface-800 border-b border-surface-200 dark:border-surface-700 px-6 py-4",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,d.jsx)("h2",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:s.find(a=>{let b;return b=a.href,l.pathname===b})?.name||"TCG Vault"}),i()&&(0,d.jsx)("span",{className:"px-3 py-1 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 text-xs font-medium rounded-full",children:"⚡ Admin"})]}),(0,d.jsx)("div",{className:"flex items-center space-x-3",children:(0,d.jsx)("button",{onClick:j,className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-700 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:"dark"===k?(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{fillRule:"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",clipRule:"evenodd"})}):(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})})})})]})}),(0,d.jsx)("main",{className:"flex-1 overflow-auto p-6",children:(0,d.jsx)("div",{className:"max-w-7xl mx-auto",children:a})})]})]}),(0,d.jsxs)("div",{className:"lg:hidden",children:[(0,d.jsx)("header",{className:"fixed top-0 left-0 right-0 z-40 bg-white dark:bg-surface-900 border-b border-surface-200 dark:border-surface-700 px-4 py-3 safe-area-inset-top",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,d.jsx)("button",{onClick:()=>q(!p),className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-800 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors",children:(0,d.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),(0,d.jsx)("div",{className:"bg-gradient-to-r from-primary-500 to-accent-500 text-white p-2 rounded-xl",children:(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-lg font-bold text-surface-900 dark:text-white",children:"TCG Vault"}),(0,d.jsxs)("p",{className:"text-xs text-surface-600 dark:text-surface-400",children:["Hi, ",b?.firstName||b?.username]})]})]}),(0,d.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,d.jsx)("button",{onClick:j,className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-800 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors",children:"dark"===k?(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{fillRule:"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",clipRule:"evenodd"})}):(0,d.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})})}),(0,d.jsxs)("button",{onClick:()=>o(!0),className:"relative p-1",children:[(0,d.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold text-sm",children:b?.firstName?.[0]||b?.username?.[0]?.toUpperCase()||"U"}),i()&&(0,d.jsx)("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-yellow-400 rounded-full border border-white dark:border-surface-900"})]})]})]})}),p&&(0,d.jsxs)("div",{className:"fixed inset-0 z-50 lg:hidden",children:[(0,d.jsx)("div",{className:"fixed inset-0 bg-black/50",onClick:()=>q(!1)}),(0,d.jsxs)("div",{className:"fixed left-0 top-0 bottom-0 w-64 bg-white dark:bg-surface-800 border-r border-surface-200 dark:border-surface-700 transform transition-transform duration-300 ease-in-out",children:[(0,d.jsx)("div",{className:"p-6 border-b border-surface-200 dark:border-surface-700",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)(f.Link,{to:"/dashboard",className:"flex items-center space-x-3",onClick:()=>q(!1),children:[(0,d.jsx)("div",{className:"bg-gradient-to-r from-primary-500 to-accent-500 text-white p-3 rounded-xl",children:(0,d.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"TCG Vault"}),(0,d.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:["Hi, ",b?.firstName||b?.username]})]})]}),(0,d.jsx)("button",{onClick:()=>q(!1),className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-800 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors",children:(0,d.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,d.jsx)("nav",{className:"flex-1 p-4 space-y-2",children:s.map(a=>{let b;return(0,d.jsxs)(f.Link,{to:a.href,onClick:()=>q(!1),className:`flex items-center space-x-3 px-4 py-3 rounded-xl text-sm font-medium transition-all duration-200 ${(b=a.href,l.pathname===b)?"bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white hover:bg-surface-100 dark:hover:bg-surface-700"}`,children:[(0,d.jsx)("span",{className:"text-lg",children:a.icon}),(0,d.jsx)("span",{children:a.name})]},a.name)})}),(0,d.jsx)("div",{className:"p-4 border-t border-surface-200 dark:border-surface-700",children:(0,d.jsxs)("div",{className:"flex items-center space-x-3 p-3 rounded-xl bg-surface-50 dark:bg-surface-700",children:[(0,d.jsx)("div",{className:"w-10 h-10 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold",children:b?.firstName?.[0]||b?.username?.[0]?.toUpperCase()||"U"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium text-surface-900 dark:text-white truncate",children:b?.firstName&&b?.lastName?`${b.firstName} ${b.lastName}`:b?.username}),(0,d.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 truncate",children:b?.email})]})]})})]})]}),(0,d.jsx)("nav",{className:"fixed bottom-0 left-0 right-0 z-50 bg-white dark:bg-surface-900 border-t border-surface-200 dark:border-surface-700 safe-area-inset-bottom",children:(0,d.jsxs)("div",{className:"relative flex items-end justify-around px-4 py-2",children:[(0,d.jsxs)(f.Link,{to:"/dashboard",className:`flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 ${"/dashboard"===l.pathname?"text-primary-600 dark:text-primary-400":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:[(0,d.jsx)("div",{className:"mb-1",children:"/dashboard"===l.pathname?(0,d.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"})}):(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),(0,d.jsx)("span",{className:"text-xs font-medium",children:"Home"})]}),(0,d.jsxs)(f.Link,{to:"/cards",className:`flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 ${"/cards"===l.pathname?"text-primary-600 dark:text-primary-400":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:[(0,d.jsx)("div",{className:"mb-1",children:"/cards"===l.pathname?(0,d.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}):(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsx)("span",{className:"text-xs font-medium",children:"Cards"})]}),(0,d.jsxs)(f.Link,{to:"/scanner",className:"relative flex flex-col items-center justify-center -mt-6 mb-2",children:[(0,d.jsx)("div",{className:`w-14 h-14 rounded-full shadow-lg transition-all duration-200 flex items-center justify-center ${"/scanner"===l.pathname?"bg-gradient-to-r from-primary-600 to-accent-600 shadow-primary-500/25 shadow-xl":"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 shadow-primary-500/20 hover:shadow-xl"}`,children:(0,d.jsxs)("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,d.jsx)("span",{className:"text-xs font-medium text-primary-600 dark:text-primary-400 mt-1",children:"Scanner"})]}),(0,d.jsxs)(f.Link,{to:"/collections",className:`flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 ${"/collections"===l.pathname?"text-primary-600 dark:text-primary-400":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:[(0,d.jsx)("div",{className:"mb-1",children:"/collections"===l.pathname?(0,d.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h3a1 1 0 110 2h-1v10a2 2 0 01-2 2H7a2 2 0 01-2-2V6H4a1 1 0 010-2h3zM9 4h6V3H9v1zm8 2H7v10h10V6z"})}):(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsx)("span",{className:"text-xs font-medium",children:"Collections"})]}),(0,d.jsxs)("button",{onClick:()=>o(!0),className:"flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white",children:[(0,d.jsx)("div",{className:"mb-1",children:(0,d.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),(0,d.jsx)("span",{className:"text-xs font-medium",children:"More"})]})]})}),(0,d.jsx)("main",{className:"pt-16 pb-20 px-4 max-w-md mx-auto",children:(0,d.jsx)("div",{className:"animate-fade-in",children:a})}),n&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:()=>o(!1),children:(0,d.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl p-6 safe-area-inset-bottom animate-slide-up",children:[(0,d.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,d.jsxs)("div",{className:"flex items-center space-x-4 mb-6 p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:[(0,d.jsx)("div",{className:"w-12 h-12 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold text-lg",children:b?.firstName?.[0]||b?.username?.[0]?.toUpperCase()||"U"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-surface-900 dark:text-white",children:b?.firstName&&b?.lastName?`${b.firstName} ${b.lastName}`:b?.username}),(0,d.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:b?.email}),(0,d.jsx)("div",{className:"flex gap-1 mt-1",children:b?.roles.map(a=>(0,d.jsx)("span",{className:`px-2 py-0.5 rounded-full text-xs font-medium ${"admin"===a?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-200"}`,children:a},a))})]})]}),(0,d.jsxs)("div",{className:"space-y-2 mb-6",children:[(0,d.jsxs)(f.Link,{to:"/decks",onClick:()=>o(!1),className:"flex items-center space-x-3 p-3 rounded-xl hover:bg-surface-100 dark:hover:bg-surface-800 transition-colors",children:[(0,d.jsx)("svg",{className:"w-5 h-5 text-surface-600 dark:text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),(0,d.jsx)("span",{className:"text-surface-900 dark:text-white font-medium",children:"Decks"})]}),(0,d.jsxs)(f.Link,{to:"/settings",onClick:()=>o(!1),className:"flex items-center space-x-3 p-3 rounded-xl hover:bg-surface-100 dark:hover:bg-surface-800 transition-colors",children:[(0,d.jsxs)("svg",{className:"w-5 h-5 text-surface-600 dark:text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),(0,d.jsx)("span",{className:"text-surface-900 dark:text-white font-medium",children:"Settings"})]}),i()&&(0,d.jsxs)(f.Link,{to:"/admin",onClick:()=>o(!1),className:"flex items-center space-x-3 p-3 rounded-xl hover:bg-yellow-50 dark:hover:bg-yellow-900/20 transition-colors",children:[(0,d.jsx)("svg",{className:"w-5 h-5 text-yellow-600 dark:text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),(0,d.jsx)("span",{className:"text-yellow-700 dark:text-yellow-300 font-medium",children:"Admin Panel"})]})]}),(0,d.jsxs)("button",{onClick:r,className:"w-full flex items-center justify-center space-x-2 p-3 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 rounded-xl hover:bg-red-100 dark:hover:bg-red-900/30 transition-colors font-medium",children:[(0,d.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})}),(0,d.jsx)("span",{children:"Sign Out"})]})]})})]}),(n||p)&&(0,d.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>{o(!1),q(!1)}})]})}},3563:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"interpolateAs",{enumerable:!0,get:function(){return f}});let d=c(2417),e=c(3898);function f(a,b,c){let f="",g=(0,e.getRouteRegex)(a),h=g.groups,i=(b!==a?(0,d.getRouteMatcher)(g)(b):"")||c;f=a;let j=Object.keys(h);return j.every(a=>{let b=i[a]||"",{repeat:c,optional:d}=h[a],e="["+(c?"...":"")+a+"]";return d&&(e=(b?"":"/")+"["+e+"]"),c&&!Array.isArray(b)&&(b=[b]),(d||a in i)&&(f=f.replace(e,c?b.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(b))||"/")})||(f=""),{params:j,result:f}}},3622:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>j});var e=c(8732),f=c(2015),g=c(8462),h=c(6659),i=a([g,h]);[g,h]=i.then?(await i)():i;let j=({isOpen:a,onClose:b,collectionId:c})=>{let d=(0,g.useQueryClient)(),[i,j]=(0,f.useState)({name:"",description:"",game:"",tags:[],color:"#8b5cf6",icon:"\uD83D\uDCDA",isPublic:!1}),[k,l]=(0,f.useState)([]),[m,n]=(0,f.useState)(!1),{data:o}=(0,g.useQuery)({queryKey:["collection",c],queryFn:()=>h.LO.collections.getCollection(c,!1),enabled:!!c}),{data:p=[]}=(0,g.useQuery)({queryKey:["tags"],queryFn:()=>h.LO.tags.getTags()}),q=(0,g.useMutation)({mutationFn:h.LO.collections.createCollection,onSuccess:()=>{d.invalidateQueries({queryKey:["collections"]}),b()}}),r=(0,g.useMutation)({mutationFn:({id:a,data:b})=>h.LO.collections.updateCollection(a,b),onSuccess:()=>{d.invalidateQueries({queryKey:["collections"]}),d.invalidateQueries({queryKey:["collection",c]}),b()}});(0,f.useEffect)(()=>{o&&(j({name:o.name,description:o.description||"",game:o.game||"",tags:o.tags,color:o.color||"#8b5cf6",icon:o.icon||"\uD83D\uDCDA",isPublic:o.isPublic}),l(o.tags))},[o]);let s=async a=>{a.preventDefault();let b={...i,tags:k};c&&o?r.mutate({id:c,data:b}):q.mutate(b)};return a?(0,e.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:b,children:(0,e.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl max-h-[90vh] overflow-hidden animate-slide-up",children:(0,e.jsxs)("div",{className:"p-6",children:[(0,e.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,e.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:c?"Edit Collection":"New Collection"}),(0,e.jsx)("button",{onClick:b,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,e.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,e.jsx)("div",{className:"max-h-[calc(90vh-8rem)] overflow-y-auto",children:(0,e.jsxs)("form",{onSubmit:s,className:"space-y-6",onClick:a=>a.stopPropagation(),children:[(0,e.jsx)("div",{className:"p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:(0,e.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:i.color},children:i.icon}),(0,e.jsxs)("div",{className:"flex-1",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:i.name||"Collection Name"}),i.description&&(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:i.description}),i.game&&(0,e.jsx)("span",{className:`inline-block mt-2 px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(i.game)}`,children:i.game})]})]})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Collection Name *"}),(0,e.jsx)("input",{type:"text",value:i.name,onChange:a=>j(b=>({...b,name:a.target.value})),placeholder:"Enter collection name...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",required:!0})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Description"}),(0,e.jsx)("textarea",{value:i.description,onChange:a=>j(b=>({...b,description:a.target.value})),rows:3,placeholder:"Describe your collection...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors resize-none"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Game (Optional)"}),(0,e.jsxs)("select",{value:i.game,onChange:a=>j(b=>({...b,game:a.target.value})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,e.jsx)("option",{value:"",children:"All Games"}),(0,e.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,e.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,e.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,e.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"}),(0,e.jsx)("option",{value:"OTHER",children:"Other"})]})]}),(0,e.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Icon"}),(0,e.jsx)("button",{type:"button",onClick:()=>n(!m),className:"w-full p-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl flex items-center justify-center text-2xl hover:bg-surface-100 dark:hover:bg-surface-600 transition-colors",children:i.icon}),m&&(0,e.jsx)("div",{className:"mt-2 p-3 bg-white dark:bg-surface-800 border border-surface-200 dark:border-surface-700 rounded-xl",children:(0,e.jsx)("div",{className:"grid grid-cols-5 gap-2",children:["\uD83D\uDCDA","\uD83C\uDFB4","⚡","\uD83D\uDD25","\uD83D\uDCA7","\uD83C\uDF3F","⚫","\uD83D\uDFE4","\uD83D\uDFE1","\uD83D\uDD34","\uD83D\uDFE2","\uD83D\uDD35","\uD83D\uDFE3","⚪","\uD83C\uDF1F","\uD83D\uDC8E","\uD83D\uDC51","\uD83C\uDFC6","\uD83C\uDFAF","\uD83D\uDE80"].map(a=>(0,e.jsx)("button",{type:"button",onClick:()=>{j(b=>({...b,icon:a})),n(!1)},className:`p-2 rounded-lg text-xl hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors ${i.icon===a?"bg-primary-100 dark:bg-primary-900/30":""}`,children:a},a))})})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Color"}),(0,e.jsx)("div",{className:"grid grid-cols-5 gap-2",children:["#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#ec4899","#8b5cf6","#6366f1","#06b6d4","#84cc16"].map(a=>(0,e.jsx)("button",{type:"button",onClick:()=>j(b=>({...b,color:a})),className:`w-full h-10 rounded-lg transition-all ${i.color===a?"ring-2 ring-surface-400 ring-offset-2 dark:ring-offset-surface-900":""}`,style:{backgroundColor:a}},a))})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Tags"}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(a=>(0,e.jsx)("button",{type:"button",onClick:()=>{l(b=>b.includes(a.id)?b.filter(b=>b!==a.id):[...b,a.id])},className:`px-3 py-2 rounded-full text-sm font-medium transition-colors ${k.includes(a.id)?"text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,style:{backgroundColor:k.includes(a.id)?a.color:void 0},children:a.name},a.id))})]}),(0,e.jsx)("div",{children:(0,e.jsxs)("label",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:"text-sm font-medium text-surface-700 dark:text-surface-300",children:"Public Collection"}),(0,e.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 mt-1",children:"Allow others to view your collection"})]}),(0,e.jsx)("button",{type:"button",onClick:()=>j(a=>({...a,isPublic:!a.isPublic})),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 ${i.isPublic?"bg-primary-600":"bg-surface-200 dark:bg-surface-700"}`,children:(0,e.jsx)("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${i.isPublic?"translate-x-5":"translate-x-0"}`})})]})}),(0,e.jsx)("button",{type:"submit",disabled:!i.name.trim()||q.isPending||r.isPending,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:q.isPending||r.isPending?(0,e.jsxs)("div",{className:"flex items-center justify-center",children:[(0,e.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,e.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,e.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),c?"Updating...":"Creating..."]}):c?"Update Collection":"Create Collection"})]})})]})})}):null};d()}catch(a){d(a)}})},3771:(a,b,c)=>{"use strict";c.d(b,{A:()=>h});var d=c(8732),e=c(2015),f=c(4822),g=c(4670);let h=()=>{let{register:a}=(0,g.A)(),[b,c]=(0,e.useState)({firstName:"",lastName:"",username:"",email:"",password:"",confirmPassword:""}),[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(null),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(!1),p=async c=>{if(c.preventDefault(),i(!0),k(null),b.password!==b.confirmPassword){k("Passwords do not match"),i(!1);return}try{await a(b)}catch(a){k(a instanceof Error?a.message:"Registration failed")}finally{i(!1)}},q=a=>{c(b=>({...b,[a.target.name]:a.target.value}))};return(0,d.jsxs)("div",{className:"bg-white dark:bg-surface-800 p-8 rounded-2xl shadow-xl border border-surface-200 dark:border-surface-700 transition-colors",children:[(0,d.jsxs)("div",{className:"text-center mb-8",children:[(0,d.jsx)("div",{className:"w-16 h-16 bg-gradient-to-r from-primary-500 to-accent-500 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-lg",children:(0,d.jsx)("svg",{className:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white mb-2",children:"Join TCG Vault"}),(0,d.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:"Create your account to get started"})]}),j&&(0,d.jsx)("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl",children:(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)("svg",{className:"w-5 h-5 text-red-500 mr-2",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),(0,d.jsx)("span",{className:"text-red-700 dark:text-red-400 text-sm",children:j})]})}),(0,d.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"firstName",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"First Name"}),(0,d.jsx)("input",{type:"text",id:"firstName",name:"firstName",value:b.firstName,onChange:q,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"John",required:!0})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"lastName",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Last Name"}),(0,d.jsx)("input",{type:"text",id:"lastName",name:"lastName",value:b.lastName,onChange:q,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"Doe",required:!0})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"username",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Username"}),(0,d.jsx)("input",{type:"text",id:"username",name:"username",value:b.username,onChange:q,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"johndoe",required:!0})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Email Address"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:"email",id:"email",name:"email",value:b.email,onChange:q,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"john@example.com",required:!0}),(0,d.jsx)("svg",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Password"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:l?"text":"password",id:"password",name:"password",value:b.password,onChange:q,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors pr-12",placeholder:"Create a strong password",required:!0}),(0,d.jsx)("button",{type:"button",onClick:()=>m(!l),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-400 dark:text-surface-500 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:l?(0,d.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.878 9.878L3 3m6.878 6.878L21 21"})}):(0,d.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Confirm Password"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:n?"text":"password",id:"confirmPassword",name:"confirmPassword",value:b.confirmPassword,onChange:q,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors pr-12",placeholder:"Confirm your password",required:!0}),(0,d.jsx)("button",{type:"button",onClick:()=>o(!n),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-400 dark:text-surface-500 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:n?(0,d.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.878 9.878L3 3m6.878 6.878L21 21"})}):(0,d.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,d.jsx)("button",{type:"submit",disabled:h,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-3 px-4 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:h?(0,d.jsxs)("div",{className:"flex items-center justify-center",children:[(0,d.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,d.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Creating Account..."]}):"Create Account"}),(0,d.jsx)("div",{className:"text-center",children:(0,d.jsxs)("p",{className:"text-surface-600 dark:text-surface-400",children:["Already have an account?"," ",(0,d.jsx)(f.Link,{to:"/login",className:"text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-medium transition-colors",children:"Sign in"})]})})]})]})}},3898:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{getNamedMiddlewareRegex:function(){return p},getNamedRouteRegex:function(){return o},getRouteRegex:function(){return l},parseParameter:function(){return i}});let d=c(2072),e=c(6580),f=c(8900),g=c(1730),h=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function i(a){let b=a.match(h);return b?j(b[2]):j(a)}function j(a){let b=a.startsWith("[")&&a.endsWith("]");b&&(a=a.slice(1,-1));let c=a.startsWith("...");return c&&(a=a.slice(3)),{key:a,repeat:c,optional:b}}function k(a,b,c){let d={},i=1,k=[];for(let l of(0,g.removeTrailingSlash)(a).slice(1).split("/")){let a=e.INTERCEPTION_ROUTE_MARKERS.find(a=>l.startsWith(a)),g=l.match(h);if(a&&g&&g[2]){let{key:b,optional:c,repeat:e}=j(g[2]);d[b]={pos:i++,repeat:e,optional:c},k.push("/"+(0,f.escapeStringRegexp)(a)+"([^/]+?)")}else if(g&&g[2]){let{key:a,repeat:b,optional:e}=j(g[2]);d[a]={pos:i++,repeat:b,optional:e},c&&g[1]&&k.push("/"+(0,f.escapeStringRegexp)(g[1]));let h=b?e?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";c&&g[1]&&(h=h.substring(1)),k.push(h)}else k.push("/"+(0,f.escapeStringRegexp)(l));b&&g&&g[3]&&k.push((0,f.escapeStringRegexp)(g[3]))}return{parameterizedRoute:k.join(""),groups:d}}function l(a,b){let{includeSuffix:c=!1,includePrefix:d=!1,excludeOptionalTrailingSlash:e=!1}=void 0===b?{}:b,{parameterizedRoute:f,groups:g}=k(a,c,d),h=f;return e||(h+="(?:/)?"),{re:RegExp("^"+h+"$"),groups:g}}function m(a){let b,{interceptionMarker:c,getSafeRouteKey:d,segment:e,routeKeys:g,keyPrefix:h,backreferenceDuplicateKeys:i}=a,{key:k,optional:l,repeat:m}=j(e),n=k.replace(/\W/g,"");h&&(n=""+h+n);let o=!1;(0===n.length||n.length>30)&&(o=!0),isNaN(parseInt(n.slice(0,1)))||(o=!0),o&&(n=d());let p=n in g;h?g[n]=""+h+k:g[n]=k;let q=c?(0,f.escapeStringRegexp)(c):"";return b=p&&i?"\\k<"+n+">":m?"(?<"+n+">.+?)":"(?<"+n+">[^/]+?)",l?"(?:/"+q+b+")?":"/"+q+b}function n(a,b,c,i,j){let k,l=(k=0,()=>{let a="",b=++k;for(;b>0;)a+=String.fromCharCode(97+(b-1)%26),b=Math.floor((b-1)/26);return a}),n={},o=[];for(let k of(0,g.removeTrailingSlash)(a).slice(1).split("/")){let a=e.INTERCEPTION_ROUTE_MARKERS.some(a=>k.startsWith(a)),g=k.match(h);if(a&&g&&g[2])o.push(m({getSafeRouteKey:l,interceptionMarker:g[1],segment:g[2],routeKeys:n,keyPrefix:b?d.NEXT_INTERCEPTION_MARKER_PREFIX:void 0,backreferenceDuplicateKeys:j}));else if(g&&g[2]){i&&g[1]&&o.push("/"+(0,f.escapeStringRegexp)(g[1]));let a=m({getSafeRouteKey:l,segment:g[2],routeKeys:n,keyPrefix:b?d.NEXT_QUERY_PARAM_PREFIX:void 0,backreferenceDuplicateKeys:j});i&&g[1]&&(a=a.substring(1)),o.push(a)}else o.push("/"+(0,f.escapeStringRegexp)(k));c&&g&&g[3]&&o.push((0,f.escapeStringRegexp)(g[3]))}return{namedParameterizedRoute:o.join(""),routeKeys:n}}function o(a,b){var c,d,e;let f=n(a,b.prefixRouteKeys,null!=(c=b.includeSuffix)&&c,null!=(d=b.includePrefix)&&d,null!=(e=b.backreferenceDuplicateKeys)&&e),g=f.namedParameterizedRoute;return b.excludeOptionalTrailingSlash||(g+="(?:/)?"),{...l(a,b),namedRegex:"^"+g+"$",routeKeys:f.routeKeys}}function p(a,b){let{parameterizedRoute:c}=k(a,!1,!1),{catchAll:d=!0}=b;if("/"===c)return{namedRegex:"^/"+(d?".*":"")+"$"};let{namedParameterizedRoute:e}=n(a,!1,!1,!1,!1);return{namedRegex:"^"+e+(d?"(?:(/.*)?)":"")+"$"}}},3949:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}}),c(7020);let d=c(8732);c(2015);let e=c(5306);function f(a){function b(b){return(0,d.jsx)(a,{router:(0,e.useRouter)(),...b})}return b.getInitialProps=a.getInitialProps,b.origGetInitialProps=a.origGetInitialProps,b}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},4233:(a,b,c)=>{a.exports=c(5306)},4587:(a,b,c)=>{"use strict";c.d(b,{A:()=>k});var d=c(8732),e=c(2015),f=c(4670),g=c(4822);let h=()=>{let{token:a}=(0,f.A)(),[b,c]=(0,e.useState)([]),[g,h]=(0,e.useState)(!0),[i,j]=(0,e.useState)(""),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(1),[o,p]=(0,e.useState)(1),[q,r]=(0,e.useState)(null),s=async(b=1,d="")=>{try{h(!0);let e=await fetch(`/api/admin/users?page=${b}&limit=20&search=${encodeURIComponent(d)}`,{headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(!e.ok)throw Error("Failed to fetch users");let f=await e.json();c(f.users),n(f.pagination.page),p(f.pagination.totalPages),j("")}catch(a){j(a.message)}finally{h(!1)}};(0,e.useEffect)(()=>{s(m,k)},[m,a]);let t=async(b,c)=>{try{if(!(await fetch(`/api/admin/users?id=${b}`,{method:"PUT",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(c)})).ok)throw Error("Failed to update user");s(m,k),r(null)}catch(a){j(a.message)}},u=a=>new Date(a).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return g&&0===b.length?(0,d.jsx)("div",{className:"p-6 flex justify-center items-center",children:(0,d.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600"})}):(0,d.jsxs)("div",{className:"p-6",children:[(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"User Management"}),(0,d.jsx)("p",{className:"text-sm text-gray-600",children:"Manage user accounts, roles, and permissions."})]}),(0,d.jsx)("form",{onSubmit:a=>{a.preventDefault(),n(1),s(1,k)},className:"mb-6",children:(0,d.jsxs)("div",{className:"flex gap-4",children:[(0,d.jsx)("div",{className:"flex-1",children:(0,d.jsx)("input",{type:"text",placeholder:"Search users by username, email, or name...",value:k,onChange:a=>l(a.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"})}),(0,d.jsx)("button",{type:"submit",className:"px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:"Search"})]})}),i&&(0,d.jsx)("div",{className:"mb-4 bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-lg",children:i}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,d.jsx)("thead",{className:"bg-gray-50",children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"User"}),(0,d.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Roles"}),(0,d.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,d.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created"}),(0,d.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Login"}),(0,d.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),(0,d.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:b.map(a=>(0,d.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,d.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"text-sm font-medium text-gray-900",children:a.first_name||a.last_name?`${a.first_name||""} ${a.last_name||""}`.trim():a.username}),(0,d.jsx)("div",{className:"text-sm text-gray-500",children:a.email}),(a.first_name||a.last_name)&&(0,d.jsxs)("div",{className:"text-xs text-gray-400",children:["@",a.username]})]})}),(0,d.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,d.jsx)("div",{className:"flex flex-wrap gap-1",children:a.roles.map(a=>(0,d.jsx)("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${(a=>{switch(a){case"admin":return"bg-purple-100 text-purple-800";case"user":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}})(a)}`,children:a},a))})}),(0,d.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,d.jsx)("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${a.is_active?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:a.is_active?"Active":"Inactive"})}),(0,d.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u(a.created_at)}),(0,d.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:a.last_login?u(a.last_login):"Never"}),(0,d.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,d.jsxs)("div",{className:"flex space-x-2",children:[(0,d.jsx)("button",{onClick:()=>r(a),className:"text-indigo-600 hover:text-indigo-900",children:"Edit"}),(0,d.jsx)("button",{onClick:()=>t(a.id,{isActive:!a.is_active}),className:a.is_active?"text-red-600 hover:text-red-900":"text-green-600 hover:text-green-900",children:a.is_active?"Deactivate":"Activate"})]})})]},a.id))})]})}),o>1&&(0,d.jsx)("div",{className:"mt-6 flex justify-center",children:(0,d.jsxs)("nav",{className:"flex space-x-2",children:[(0,d.jsx)("button",{onClick:()=>n(Math.max(1,m-1)),disabled:1===m,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50",children:"Previous"}),(0,d.jsxs)("span",{className:"px-3 py-2 text-sm",children:["Page ",m," of ",o]}),(0,d.jsx)("button",{onClick:()=>n(Math.min(o,m+1)),disabled:m===o,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50",children:"Next"})]})}),q&&(0,d.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,d.jsxs)("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[(0,d.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Edit User"}),(0,d.jsx)("div",{className:"space-y-4",children:(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:"Roles"}),(0,d.jsx)("div",{className:"mt-2 space-y-2",children:["user","admin"].map(a=>(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"checkbox",checked:q.roles.includes(a),onChange:b=>{let c=b.target.checked?[...q.roles,a]:q.roles.filter(b=>b!==a);r({...q,roles:c})},className:"mr-2"}),(0,d.jsx)("span",{className:"capitalize",children:a})]},a))})]})}),(0,d.jsxs)("div",{className:"mt-6 flex justify-end space-x-3",children:[(0,d.jsx)("button",{onClick:()=>r(null),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200",children:"Cancel"}),(0,d.jsx)("button",{onClick:()=>t(q.id,{roles:q.roles}),className:"px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700",children:"Save Changes"})]})]})})]})},i=()=>(0,d.jsxs)("div",{className:"p-6",children:[(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"System Dashboard"}),(0,d.jsx)("p",{className:"text-sm text-gray-600",children:"Overview of system statistics and health."})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[(0,d.jsx)("div",{className:"bg-gradient-to-r from-blue-500 to-blue-600 rounded-lg p-6 text-white",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-blue-100 text-sm",children:"Total Users"}),(0,d.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,d.jsx)("div",{className:"bg-blue-400 bg-opacity-30 rounded-full p-3",children:(0,d.jsx)("svg",{className:"w-8 h-8",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"})})})]})}),(0,d.jsx)("div",{className:"bg-gradient-to-r from-green-500 to-green-600 rounded-lg p-6 text-white",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-green-100 text-sm",children:"Total Cards"}),(0,d.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,d.jsx)("div",{className:"bg-green-400 bg-opacity-30 rounded-full p-3",children:(0,d.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})})]})}),(0,d.jsx)("div",{className:"bg-gradient-to-r from-purple-500 to-purple-600 rounded-lg p-6 text-white",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-purple-100 text-sm",children:"Active Sessions"}),(0,d.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,d.jsx)("div",{className:"bg-purple-400 bg-opacity-30 rounded-full p-3",children:(0,d.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})})]})}),(0,d.jsx)("div",{className:"bg-gradient-to-r from-orange-500 to-orange-600 rounded-lg p-6 text-white",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-orange-100 text-sm",children:"Collections"}),(0,d.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,d.jsx)("div",{className:"bg-orange-400 bg-opacity-30 rounded-full p-3",children:(0,d.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})})]})})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",children:[(0,d.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"System Health"}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-sm text-gray-600",children:"Database Status"}),(0,d.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"● Online"})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-sm text-gray-600",children:"API Status"}),(0,d.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"● Operational"})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("span",{className:"text-sm text-gray-600",children:"Storage"}),(0,d.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"● 75% Used"})]})]})]}),(0,d.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Recent Activity"}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-start",children:[(0,d.jsx)("div",{className:"bg-blue-100 rounded-full p-1 mr-3 mt-0.5",children:(0,d.jsx)("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,d.jsx)("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0z"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-gray-900",children:"New user registration"}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:"2 minutes ago"})]})]}),(0,d.jsxs)("div",{className:"flex items-start",children:[(0,d.jsx)("div",{className:"bg-green-100 rounded-full p-1 mr-3 mt-0.5",children:(0,d.jsx)("svg",{className:"w-4 h-4 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-gray-900",children:"Card database updated"}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:"15 minutes ago"})]})]}),(0,d.jsxs)("div",{className:"flex items-start",children:[(0,d.jsx)("div",{className:"bg-purple-100 rounded-full p-1 mr-3 mt-0.5",children:(0,d.jsx)("svg",{className:"w-4 h-4 text-purple-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-gray-900",children:"System backup completed"}),(0,d.jsx)("p",{className:"text-xs text-gray-500",children:"1 hour ago"})]})]})]})]})]}),(0,d.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,d.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,d.jsx)("div",{className:"text-indigo-600 mb-2",children:(0,d.jsx)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),(0,d.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Add User"})]}),(0,d.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,d.jsx)("div",{className:"text-green-600 mb-2",children:(0,d.jsx)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}),(0,d.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Import Cards"})]}),(0,d.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,d.jsx)("div",{className:"text-orange-600 mb-2",children:(0,d.jsx)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),(0,d.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"View Reports"})]}),(0,d.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,d.jsx)("div",{className:"text-red-600 mb-2",children:(0,d.jsxs)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,d.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Settings"})]})]})]})]}),j=()=>{let{user:a,token:b}=(0,f.A)(),[c,g]=(0,e.useState)({}),[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)({}),[l,m]=(0,e.useState)("ALL"),[n,o]=(0,e.useState)(""),p=async()=>{try{let a=await fetch("https://tcg-vault.vercel.app/api/admin?action=card-counts",{headers:{Authorization:`Bearer ${b}`}});if(a.ok){let b=await a.json();g(b.counts||{})}}catch(a){console.error("Error fetching card counts:",a)}};(0,e.useEffect)(()=>{p()},[]);let q=async a=>{i(!0),o(`Loading ${a} cards...`),k({});try{let c=await fetch("https://tcg-vault.vercel.app/api/admin?action=load-cards",{method:"POST",headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json"},body:JSON.stringify({game:a})});if(c.ok){let a=await c.json();k(a.results||{}),o(`Successfully loaded cards! ${a.message}`),setTimeout(()=>{p()},1e3)}else{let a=await c.json();o(`Error loading cards: ${a.error}`)}}catch(a){console.error("Error loading cards:",a),o("Error loading cards. Please try again.")}finally{i(!1)}};return(0,d.jsxs)("div",{className:"bg-white rounded-lg shadow-md p-6",children:[(0,d.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Card Database Loader"}),(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-3",children:"Current Database Status"}),(0,d.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,d.jsxs)("div",{className:"bg-blue-50 p-4 rounded-lg",children:[(0,d.jsx)("div",{className:"text-2xl font-bold text-blue-600",children:c.MTG||0}),(0,d.jsx)("div",{className:"text-sm text-blue-500",children:"MTG Cards"})]}),(0,d.jsxs)("div",{className:"bg-yellow-50 p-4 rounded-lg",children:[(0,d.jsx)("div",{className:"text-2xl font-bold text-yellow-600",children:c.POKEMON||0}),(0,d.jsx)("div",{className:"text-sm text-yellow-500",children:"Pok\xe9mon Cards"})]}),(0,d.jsxs)("div",{className:"bg-purple-50 p-4 rounded-lg",children:[(0,d.jsx)("div",{className:"text-2xl font-bold text-purple-600",children:c.LORCANA||0}),(0,d.jsx)("div",{className:"text-sm text-purple-500",children:"Lorcana Cards"})]}),(0,d.jsxs)("div",{className:"bg-green-50 p-4 rounded-lg",children:[(0,d.jsx)("div",{className:"text-2xl font-bold text-green-600",children:c.total||0}),(0,d.jsx)("div",{className:"text-sm text-green-500",children:"Total Cards"})]})]})]}),(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-3",children:"Load Cards from External APIs"}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 mb-4",children:[(0,d.jsxs)("select",{value:l,onChange:a=>m(a.target.value),className:"px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[(0,d.jsx)("option",{value:"ALL",children:"All Games (MTG, Pok\xe9mon, Lorcana)"}),(0,d.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,d.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,d.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"})]}),(0,d.jsx)("button",{onClick:()=>{q(l)},disabled:h,className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors",children:h?"Loading...":"Load Cards"})]}),Object.keys(j).length>0&&(0,d.jsxs)("div",{className:"bg-gray-50 p-4 rounded-lg",children:[(0,d.jsx)("h4",{className:"font-semibold text-gray-700 mb-2",children:"Loading Results:"}),(0,d.jsxs)("div",{className:"space-y-2",children:[void 0!==j.mtg&&(0,d.jsxs)("div",{className:"text-blue-600",children:["MTG: ",j.mtg," cards loaded"]}),void 0!==j.pokemon&&(0,d.jsxs)("div",{className:"text-yellow-600",children:["Pok\xe9mon: ",j.pokemon," cards loaded"]}),void 0!==j.lorcana&&(0,d.jsxs)("div",{className:"text-purple-600",children:["Lorcana: ",j.lorcana," cards loaded"]})]})]}),n&&(0,d.jsx)("div",{className:`mt-4 p-3 rounded-lg ${n.includes("Error")?"bg-red-50 text-red-700 border border-red-200":"bg-green-50 text-green-700 border border-green-200"}`,children:n})]}),(0,d.jsxs)("div",{className:"bg-gray-50 p-4 rounded-lg",children:[(0,d.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-2",children:"Instructions"}),(0,d.jsxs)("ul",{className:"text-sm text-gray-600 space-y-1",children:[(0,d.jsx)("li",{children:"• This will load cards from external APIs into your database"}),(0,d.jsx)("li",{children:"• MTG cards come from Scryfall API"}),(0,d.jsx)("li",{children:"• Pok\xe9mon cards come from Pok\xe9mon TCG API"}),(0,d.jsx)("li",{children:"• Lorcana cards come from Lorcana API and Lorcast API"}),(0,d.jsx)("li",{children:"• Loading may take several minutes for large datasets"}),(0,d.jsx)("li",{children:"• Cards are deduplicated automatically"})]})]})]})},k=()=>{let{user:a,isAdmin:b}=(0,f.A)(),[c,k]=(0,e.useState)("dashboard");return b()?(0,d.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,d.jsx)("div",{className:"bg-white shadow-sm border-b border-gray-200",children:(0,d.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,d.jsxs)("div",{className:"flex justify-between items-center py-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Admin Panel"}),(0,d.jsxs)("p",{className:"text-sm text-gray-600",children:["Welcome back, ",a?.firstName||a?.username]})]}),(0,d.jsx)("div",{className:"flex items-center space-x-4",children:(0,d.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:"Admin"})})]})})}),(0,d.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:(0,d.jsxs)("div",{className:"flex flex-col lg:flex-row gap-8",children:[(0,d.jsxs)("div",{className:"lg:w-64 flex-shrink-0",children:[(0,d.jsxs)("nav",{className:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden",children:[(0,d.jsx)("div",{className:"p-4 bg-gray-50 border-b border-gray-200",children:(0,d.jsx)("h2",{className:"text-sm font-semibold text-gray-900 uppercase tracking-wide",children:"Administration"})}),(0,d.jsx)("div",{className:"p-2",children:[{id:"dashboard",name:"Dashboard",icon:"\uD83D\uDCCA"},{id:"users",name:"Users",icon:"\uD83D\uDC65"},{id:"cards",name:"Cards",icon:"\uD83C\uDCCF"},{id:"decks",name:"Decks",icon:"\uD83D\uDCDA"},{id:"settings",name:"Settings",icon:"⚙️"}].map(a=>(0,d.jsxs)("button",{onClick:()=>k(a.id),className:`w-full flex items-center px-3 py-2 text-sm font-medium rounded-md mb-1 transition-colors duration-200 ${c===a.id?"bg-indigo-100 text-indigo-700 border-r-2 border-indigo-500":"text-gray-600 hover:bg-gray-50 hover:text-gray-900"}`,children:[(0,d.jsx)("span",{className:"mr-3 text-lg",children:a.icon}),a.name]},a.id))})]}),(0,d.jsxs)("div",{className:"mt-6 bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Quick Stats"}),(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,d.jsx)("span",{className:"text-gray-600",children:"Total Users"}),(0,d.jsx)("span",{className:"font-medium text-gray-900",children:"-"})]}),(0,d.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,d.jsx)("span",{className:"text-gray-600",children:"Total Cards"}),(0,d.jsx)("span",{className:"font-medium text-gray-900",children:"-"})]}),(0,d.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,d.jsx)("span",{className:"text-gray-600",children:"Active Sessions"}),(0,d.jsx)("span",{className:"font-medium text-gray-900",children:"-"})]})]})]})]}),(0,d.jsx)("div",{className:"flex-1",children:(0,d.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 min-h-[600px]",children:(()=>{switch(c){case"dashboard":default:return(0,d.jsx)(i,{});case"users":return(0,d.jsx)(h,{});case"cards":return(0,d.jsx)(j,{});case"decks":return(0,d.jsx)("div",{className:"p-6",children:"Deck Management - Coming Soon"});case"settings":return(0,d.jsx)("div",{className:"p-6",children:"System Settings - Coming Soon"})}})()})})]})})]}):(0,d.jsx)(g.Navigate,{to:"/dashboard",replace:!0})}},4828:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{createKey:function(){return R},default:function(){return U},matchesMiddleware:function(){return J}});let d=c(7020),e=c(3147),f=c(1730),g=c(9320),h=c(1484),i=e._(c(1644)),j=c(1749),k=c(2746),l=d._(c(1217)),m=c(4718),n=c(229),o=c(5939),p=c(2417),q=c(3898),r=c(2848);c(3448);let s=c(6290),t=c(1169),u=c(7980),v=c(367),w=c(6092),x=c(617),y=c(6231),z=c(1918),A=c(9705),B=c(2620),C=c(7145),D=c(651);c(7825);let E=c(8410),F=c(3563),G=c(8652),H=c(2072);function I(){return Object.assign(Object.defineProperty(Error("Route Cancelled"),"__NEXT_ERROR_CODE",{value:"E315",enumerable:!1,configurable:!0}),{cancelled:!0})}async function J(a){let b=await Promise.resolve(a.router.pageLoader.getMiddleware());if(!b)return!1;let{pathname:c}=(0,s.parsePath)(a.asPath),d=(0,x.hasBasePath)(c)?(0,v.removeBasePath)(c):c,e=(0,w.addBasePath)((0,t.addLocale)(d,a.locale));return b.some(a=>new RegExp(a.regexp).test(e))}function K(a){let b=(0,m.getLocationOrigin)();return a.startsWith(b)?a.substring(b.length):a}function L(a,b,c){let[d,e]=(0,y.resolveHref)(a,b,!0),f=(0,m.getLocationOrigin)(),g=d.startsWith(f),h=e&&e.startsWith(f);d=K(d),e=e?K(e):e;let i=g?d:(0,w.addBasePath)(d),j=c?K((0,y.resolveHref)(a,c)):e||d;return{url:i,as:h?j:(0,w.addBasePath)(j)}}function M(a,b){let c=(0,f.removeTrailingSlash)((0,j.denormalizePagePath)(a));return"/404"===c||"/_error"===c?a:(b.includes(c)||b.some(b=>{if((0,n.isDynamicRoute)(b)&&(0,q.getRouteRegex)(b).re.test(c))return a=b,!0}),(0,f.removeTrailingSlash)(a))}async function N(a){if(!await J(a)||!a.fetchData)return null;let b=await a.fetchData(),c=await function(a,b,c){let d={basePath:c.router.basePath,i18n:{locales:c.router.locales},trailingSlash:!1},e=b.headers.get("x-nextjs-rewrite"),h=e||b.headers.get("x-nextjs-matched-path"),i=b.headers.get(H.MATCHED_PATH_HEADER);if(!i||h||i.includes("__next_data_catchall")||i.includes("/_error")||i.includes("/404")||(h=i),h){if(h.startsWith("/")){let b=(0,o.parseRelativeUrl)(h),i=(0,A.getNextPathnameInfo)(b.pathname,{nextConfig:d,parseData:!0}),j=(0,f.removeTrailingSlash)(i.pathname);return Promise.all([c.router.pageLoader.getPageList(),(0,g.getClientBuildManifest)()]).then(f=>{let[g,{__rewrites:h}]=f,l=(0,t.addLocale)(i.pathname,i.locale);if((0,n.isDynamicRoute)(l)||!e&&g.includes((0,k.normalizeLocalePath)((0,v.removeBasePath)(l),c.router.locales).pathname)){let c=(0,A.getNextPathnameInfo)((0,o.parseRelativeUrl)(a).pathname,{nextConfig:d,parseData:!0});b.pathname=l=(0,w.addBasePath)(c.pathname)}if(!g.includes(j)){let a=M(j,g);a!==j&&(j=a)}let m=g.includes(j)?j:M((0,k.normalizeLocalePath)((0,v.removeBasePath)(b.pathname),c.router.locales).pathname,g);if((0,n.isDynamicRoute)(m)){let a=(0,p.getRouteMatcher)((0,q.getRouteRegex)(m))(l);Object.assign(b.query,a||{})}return{type:"rewrite",parsedAs:b,resolvedHref:m}})}let b=(0,s.parsePath)(a);return Promise.resolve({type:"redirect-external",destination:""+(0,B.formatNextPathnameInfo)({...(0,A.getNextPathnameInfo)(b.pathname,{nextConfig:d,parseData:!0}),defaultLocale:c.router.defaultLocale,buildId:""})+b.query+b.hash})}let j=b.headers.get("x-nextjs-redirect");if(j){if(j.startsWith("/")){let a=(0,s.parsePath)(j),b=(0,B.formatNextPathnameInfo)({...(0,A.getNextPathnameInfo)(a.pathname,{nextConfig:d,parseData:!0}),defaultLocale:c.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+b+a.query+a.hash,newUrl:""+b+a.query+a.hash})}return Promise.resolve({type:"redirect-external",destination:j})}return Promise.resolve({type:"next"})}(b.dataHref,b.response,a);return{dataHref:b.dataHref,json:b.json,response:b.response,text:b.text,cacheKey:b.cacheKey,effect:c}}let O=Symbol("SSG_DATA_NOT_FOUND");function P(a){try{return JSON.parse(a)}catch(a){return null}}function Q(a){let{dataHref:b,inflightCache:c,isPrefetch:d,hasMiddleware:e,isServerRender:f,parseJSON:h,persistCache:i,isBackground:j,unstable_skipClientCache:k}=a,{href:l}=new URL(b,window.location.href),m=a=>{var j;return(function a(b,c,d){return fetch(b,{credentials:"same-origin",method:d.method||"GET",headers:Object.assign({},d.headers,{"x-nextjs-data":"1"})}).then(e=>!e.ok&&c>1&&e.status>=500?a(b,c-1,d):e)})(b,f?3:1,{headers:Object.assign({},d?{purpose:"prefetch"}:{},d&&e?{"x-middleware-prefetch":"1"}:{},{}),method:null!=(j=null==a?void 0:a.method)?j:"GET"}).then(c=>c.ok&&(null==a?void 0:a.method)==="HEAD"?{dataHref:b,response:c,text:"",json:{},cacheKey:l}:c.text().then(a=>{if(!c.ok){if(e&&[301,302,307,308].includes(c.status))return{dataHref:b,response:c,text:a,json:{},cacheKey:l};if(404===c.status){var d;if(null==(d=P(a))?void 0:d.notFound)return{dataHref:b,json:{notFound:O},response:c,text:a,cacheKey:l}}let h=Object.defineProperty(Error("Failed to load static props"),"__NEXT_ERROR_CODE",{value:"E124",enumerable:!1,configurable:!0});throw f||(0,g.markAssetError)(h),h}return{dataHref:b,json:h?P(a):null,response:c,text:a,cacheKey:l}})).then(a=>(i&&"no-cache"!==a.response.headers.get("x-middleware-cache")||delete c[l],a)).catch(a=>{throw k||delete c[l],("Failed to fetch"===a.message||"NetworkError when attempting to fetch resource."===a.message||"Load failed"===a.message)&&(0,g.markAssetError)(a),a})};return k&&i?m({}).then(a=>("no-cache"!==a.response.headers.get("x-middleware-cache")&&(c[l]=Promise.resolve(a)),a)):void 0!==c[l]?c[l]:c[l]=m(j?{method:"HEAD"}:{})}function R(){return Math.random().toString(36).slice(2,10)}function S(a){let{url:b,router:c}=a;if(b===(0,w.addBasePath)((0,t.addLocale)(c.asPath,c.locale)))throw Object.defineProperty(Error("Invariant: attempted to hard navigate to the same URL "+b+" "+location.href),"__NEXT_ERROR_CODE",{value:"E282",enumerable:!1,configurable:!0});window.location.href=b}let T=a=>{let{route:b,router:c}=a,d=!1,e=c.clc=()=>{d=!0};return()=>{if(d){let a=Object.defineProperty(Error('Abort fetching component for route: "'+b+'"'),"__NEXT_ERROR_CODE",{value:"E483",enumerable:!1,configurable:!0});throw a.cancelled=!0,a}e===c.clc&&(c.clc=null)}};class U{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(a,b,c){return void 0===c&&(c={}),{url:a,as:b}=L(this,a,b),this.change("pushState",a,b,c)}replace(a,b,c){return void 0===c&&(c={}),{url:a,as:b}=L(this,a,b),this.change("replaceState",a,b,c)}async _bfl(a,b,d,e){{if(!this._bfl_s&&!this._bfl_d){let b,f,{BloomFilter:h}=c(1219);try{({__routerFilterStatic:b,__routerFilterDynamic:f}=await (0,g.getClientBuildManifest)())}catch(b){if(console.error(b),e)return!0;return S({url:(0,w.addBasePath)((0,t.addLocale)(a,d||this.locale,this.defaultLocale)),router:this}),new Promise(()=>{})}(null==b?void 0:b.numHashes)&&(this._bfl_s=new h(b.numItems,b.errorRate),this._bfl_s.import(b)),(null==f?void 0:f.numHashes)&&(this._bfl_d=new h(f.numItems,f.errorRate),this._bfl_d.import(f))}let k=!1,l=!1;for(let{as:c,allowMatchCurrent:g}of[{as:a},{as:b}])if(c){let b=(0,f.removeTrailingSlash)(new URL(c,"http://n").pathname),m=(0,w.addBasePath)((0,t.addLocale)(b,d||this.locale));if(g||b!==(0,f.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var h,i,j;for(let a of(k=k||!!(null==(h=this._bfl_s)?void 0:h.contains(b))||!!(null==(i=this._bfl_s)?void 0:i.contains(m)),[b,m])){let b=a.split("/");for(let a=0;!l&&a{})}}}}return!1}async change(a,b,c,d,e){var j,k,l,y,z,A,B,G,H;let K,N;if(!(0,D.isLocalURL)(b))return S({url:b,router:this}),!1;let P=1===d._h;P||d.shallow||await this._bfl(c,void 0,d.locale);let Q=P||d._shouldResolveHref||(0,s.parsePath)(b).pathname===(0,s.parsePath)(c).pathname,R={...this.state},T=!0!==this.isReady;this.isReady=!0;let V=this.isSsr;if(P||(this.isSsr=!1),P&&this.clc)return!1;let W=R.locale;m.ST&&performance.mark("routeChange");let{shallow:X=!1,scroll:Y=!0}=d,Z={shallow:X};this._inFlightRoute&&this.clc&&(V||U.events.emit("routeChangeError",I(),this._inFlightRoute,Z),this.clc(),this.clc=null),c=(0,w.addBasePath)((0,t.addLocale)((0,x.hasBasePath)(c)?(0,v.removeBasePath)(c):c,d.locale,this.defaultLocale));let $=(0,u.removeLocale)((0,x.hasBasePath)(c)?(0,v.removeBasePath)(c):c,R.locale);this._inFlightRoute=c;let _=W!==R.locale;if(!P&&this.onlyAHashChange($)&&!_){R.asPath=$,U.events.emit("hashChangeStart",c,Z),this.changeState(a,b,c,{...d,scroll:!1}),Y&&this.scrollToHash($);try{await this.set(R,this.components[R.route],null)}catch(a){throw(0,i.default)(a)&&a.cancelled&&U.events.emit("routeChangeError",a,$,Z),a}return U.events.emit("hashChangeComplete",c,Z),!0}let aa=(0,o.parseRelativeUrl)(b),{pathname:ab,query:ac}=aa;try{[K,{__rewrites:N}]=await Promise.all([this.pageLoader.getPageList(),(0,g.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(a){return S({url:c,router:this}),!1}this.urlIsNew($)||_||(a="replaceState");let ad=c;ab=ab?(0,f.removeTrailingSlash)((0,v.removeBasePath)(ab)):ab;let ae=(0,f.removeTrailingSlash)(ab),af=c.startsWith("/")&&(0,o.parseRelativeUrl)(c).pathname;if(null==(j=this.components[ab])?void 0:j.__appRouter)return S({url:c,router:this}),new Promise(()=>{});let ag=!!(af&&ae!==af&&(!(0,n.isDynamicRoute)(ae)||!(0,p.getRouteMatcher)((0,q.getRouteRegex)(ae))(af))),ah=!d.shallow&&await J({asPath:c,locale:R.locale,router:this});if(P&&ah&&(Q=!1),Q&&"/_error"!==ab&&(d._shouldResolveHref=!0,aa.pathname=M(ab,K),aa.pathname!==ab&&(ab=aa.pathname,aa.pathname=(0,w.addBasePath)(ab),ah||(b=(0,r.formatWithValidation)(aa)))),!(0,D.isLocalURL)(c))return S({url:c,router:this}),!1;ad=(0,u.removeLocale)((0,v.removeBasePath)(ad),R.locale),ae=(0,f.removeTrailingSlash)(ab);let ai=!1;if((0,n.isDynamicRoute)(ae)){let a=(0,o.parseRelativeUrl)(ad),d=a.pathname,e=(0,q.getRouteRegex)(ae);ai=(0,p.getRouteMatcher)(e)(d);let f=ae===d,g=f?(0,F.interpolateAs)(ae,d,ac):{};if(ai&&(!f||g.result))f?c=(0,r.formatWithValidation)(Object.assign({},a,{pathname:g.result,query:(0,E.omit)(ac,g.params)})):Object.assign(ac,ai);else{let a=Object.keys(e.groups).filter(a=>!ac[a]&&!e.groups[a].optional);if(a.length>0&&!ah)throw Object.defineProperty(Error((f?"The provided `href` ("+b+") value is missing query values ("+a.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+d+") is incompatible with the `href` value ("+ae+"). ")+"Read more: https://nextjs.org/docs/messages/"+(f?"href-interpolation-failed":"incompatible-href-as")),"__NEXT_ERROR_CODE",{value:"E344",enumerable:!1,configurable:!0})}}P||U.events.emit("routeChangeStart",c,Z);let aj="/404"===this.pathname||"/_error"===this.pathname;try{let f=await this.getRouteInfo({route:ae,pathname:ab,query:ac,as:c,resolvedAs:ad,routeProps:Z,locale:R.locale,isPreview:R.isPreview,hasMiddleware:ah,unstable_skipClientCache:d.unstable_skipClientCache,isQueryUpdating:P&&!this.isFallback,isMiddlewareRewrite:ag});if(P||d.shallow||await this._bfl(c,"resolvedAs"in f?f.resolvedAs:void 0,R.locale),"route"in f&&ah){ae=ab=f.route||ae,Z.shallow||(ac=Object.assign({},f.query||{},ac));let a=(0,x.hasBasePath)(aa.pathname)?(0,v.removeBasePath)(aa.pathname):aa.pathname;if(ai&&ab!==a&&Object.keys(ai).forEach(a=>{ai&&ac[a]===ai[a]&&delete ac[a]}),(0,n.isDynamicRoute)(ab)){let a=!Z.shallow&&f.resolvedAs?f.resolvedAs:(0,w.addBasePath)((0,t.addLocale)(new URL(c,location.href).pathname,R.locale),!0);(0,x.hasBasePath)(a)&&(a=(0,v.removeBasePath)(a));let b=(0,q.getRouteRegex)(ab),d=(0,p.getRouteMatcher)(b)(new URL(a,location.href).pathname);d&&Object.assign(ac,d)}}if("type"in f)if("redirect-internal"===f.type)return this.change(a,f.newUrl,f.newAs,d);else return S({url:f.destination,router:this}),new Promise(()=>{});let g=f.Component;if(g&&g.unstable_scriptLoader&&[].concat(g.unstable_scriptLoader()).forEach(a=>{(0,h.handleClientScriptLoad)(a.props)}),(f.__N_SSG||f.__N_SSP)&&f.props){if(f.props.pageProps&&f.props.pageProps.__N_REDIRECT){d.locale=!1;let b=f.props.pageProps.__N_REDIRECT;if(b.startsWith("/")&&!1!==f.props.pageProps.__N_REDIRECT_BASE_PATH){let c=(0,o.parseRelativeUrl)(b);c.pathname=M(c.pathname,K);let{url:e,as:f}=L(this,b,b);return this.change(a,e,f,d)}return S({url:b,router:this}),new Promise(()=>{})}if(R.isPreview=!!f.props.__N_PREVIEW,f.props.notFound===O){let a;try{await this.fetchComponent("/404"),a="/404"}catch(b){a="/_error"}if(f=await this.getRouteInfo({route:a,pathname:a,query:ac,as:c,resolvedAs:ad,routeProps:{shallow:!1},locale:R.locale,isPreview:R.isPreview,isNotFound:!0}),"type"in f)throw Object.defineProperty(Error("Unexpected middleware effect on /404"),"__NEXT_ERROR_CODE",{value:"E158",enumerable:!1,configurable:!0})}}P&&"/_error"===this.pathname&&(null==(l=self.__NEXT_DATA__.props)||null==(k=l.pageProps)?void 0:k.statusCode)===500&&(null==(y=f.props)?void 0:y.pageProps)&&(f.props.pageProps.statusCode=500);let j=d.shallow&&R.route===(null!=(z=f.route)?z:ae),m=null!=(A=d.scroll)?A:!P&&!j,r=null!=e?e:m?{x:0,y:0}:null,s={...R,route:ae,pathname:ab,query:ac,asPath:$,isFallback:!1};if(P&&aj){if(f=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:ac,as:c,resolvedAs:ad,routeProps:{shallow:!1},locale:R.locale,isPreview:R.isPreview,isQueryUpdating:P&&!this.isFallback}),"type"in f)throw Object.defineProperty(Error("Unexpected middleware effect on "+this.pathname),"__NEXT_ERROR_CODE",{value:"E225",enumerable:!1,configurable:!0});"/_error"===this.pathname&&(null==(G=self.__NEXT_DATA__.props)||null==(B=G.pageProps)?void 0:B.statusCode)===500&&(null==(H=f.props)?void 0:H.pageProps)&&(f.props.pageProps.statusCode=500);try{await this.set(s,f,r)}catch(a){throw(0,i.default)(a)&&a.cancelled&&U.events.emit("routeChangeError",a,$,Z),a}return!0}if(U.events.emit("beforeHistoryChange",c,Z),this.changeState(a,b,c,d),!(P&&!r&&!T&&!_&&(0,C.compareRouterStates)(s,this.state))){try{await this.set(s,f,r)}catch(a){if(a.cancelled)f.error=f.error||a;else throw a}if(f.error)throw P||U.events.emit("routeChangeError",f.error,$,Z),f.error;P||U.events.emit("routeChangeComplete",c,Z),m&&/#.+$/.test(c)&&this.scrollToHash(c)}return!0}catch(a){if((0,i.default)(a)&&a.cancelled)return!1;throw a}}changeState(a,b,c,d){void 0===d&&(d={}),("pushState"!==a||(0,m.getURL)()!==c)&&(this._shallow=d.shallow,window.history[a]({url:b,as:c,options:d,__N:!0,key:this._key="pushState"!==a?this._key:R()},"",c))}async handleRouteInfoError(a,b,c,d,e,f){if(a.cancelled)throw a;if((0,g.isAssetError)(a)||f)throw U.events.emit("routeChangeError",a,d,e),S({url:d,router:this}),I();console.error(a);try{let d,{page:e,styleSheets:f}=await this.fetchComponent("/_error"),g={props:d,Component:e,styleSheets:f,err:a,error:a};if(!g.props)try{g.props=await this.getInitialProps(e,{err:a,pathname:b,query:c})}catch(a){console.error("Error in error page `getInitialProps`: ",a),g.props={}}return g}catch(a){return this.handleRouteInfoError((0,i.default)(a)?a:Object.defineProperty(Error(a+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),b,c,d,e,!0)}}async getRouteInfo(a){let{route:b,pathname:c,query:d,as:e,resolvedAs:g,routeProps:h,locale:j,hasMiddleware:l,isPreview:m,unstable_skipClientCache:n,isQueryUpdating:o,isMiddlewareRewrite:p,isNotFound:q}=a,s=b;try{var t,u,w,x;let a=this.components[s];if(h.shallow&&a&&this.route===s)return a;let b=T({route:s,router:this});l&&(a=void 0);let i=!a||"initial"in a?void 0:a,y={dataHref:this.pageLoader.getDataHref({href:(0,r.formatWithValidation)({pathname:c,query:d}),skipInterpolation:!0,asPath:q?"/404":g,locale:j}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:o?this.sbc:this.sdc,persistCache:!m,isPrefetch:!1,unstable_skipClientCache:n,isBackground:o},A=o&&!p?null:await N({fetchData:()=>Q(y),asPath:q?"/404":g,locale:j,router:this}).catch(a=>{if(o)return null;throw a});if(A&&("/_error"===c||"/404"===c)&&(A.effect=void 0),o&&(A?A.json=self.__NEXT_DATA__.props:A={json:self.__NEXT_DATA__.props}),b(),(null==A||null==(t=A.effect)?void 0:t.type)==="redirect-internal"||(null==A||null==(u=A.effect)?void 0:u.type)==="redirect-external")return A.effect;if((null==A||null==(w=A.effect)?void 0:w.type)==="rewrite"){let b=(0,f.removeTrailingSlash)(A.effect.resolvedHref),e=await this.pageLoader.getPageList();if((!o||e.includes(b))&&(s=b,c=A.effect.resolvedHref,d={...d,...A.effect.parsedAs.query},g=(0,v.removeBasePath)((0,k.normalizeLocalePath)(A.effect.parsedAs.pathname,this.locales).pathname),a=this.components[s],h.shallow&&a&&this.route===s&&!l))return{...a,route:s}}if((0,z.isAPIRoute)(s))return S({url:e,router:this}),new Promise(()=>{});let B=i||await this.fetchComponent(s).then(a=>({Component:a.page,styleSheets:a.styleSheets,__N_SSG:a.mod.__N_SSG,__N_SSP:a.mod.__N_SSP})),C=null==A||null==(x=A.response)?void 0:x.headers.get("x-middleware-skip"),D=B.__N_SSG||B.__N_SSP;C&&(null==A?void 0:A.dataHref)&&delete this.sdc[A.dataHref];let{props:E,cacheKey:F}=await this._getData(async()=>{if(D){if((null==A?void 0:A.json)&&!C)return{cacheKey:A.cacheKey,props:A.json};let a=(null==A?void 0:A.dataHref)?A.dataHref:this.pageLoader.getDataHref({href:(0,r.formatWithValidation)({pathname:c,query:d}),asPath:g,locale:j}),b=await Q({dataHref:a,isServerRender:this.isSsr,parseJSON:!0,inflightCache:C?{}:this.sdc,persistCache:!m,isPrefetch:!1,unstable_skipClientCache:n});return{cacheKey:b.cacheKey,props:b.json||{}}}return{headers:{},props:await this.getInitialProps(B.Component,{pathname:c,query:d,asPath:e,locale:j,locales:this.locales,defaultLocale:this.defaultLocale})}});return B.__N_SSP&&y.dataHref&&F&&delete this.sdc[F],this.isPreview||!B.__N_SSG||o||Q(Object.assign({},y,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),E.pageProps=Object.assign({},E.pageProps),B.props=E,B.route=s,B.query=d,B.resolvedAs=g,this.components[s]=B,B}catch(a){return this.handleRouteInfoError((0,i.getProperError)(a),c,d,e,h)}}set(a,b,c){return this.state=a,this.sub(b,this.components["/_app"].Component,c)}beforePopState(a){this._bps=a}onlyAHashChange(a){if(!this.asPath)return!1;let[b,c]=this.asPath.split("#",2),[d,e]=a.split("#",2);return!!e&&b===d&&c===e||b===d&&c!==e}scrollToHash(a){let[,b=""]=a.split("#",2);(0,G.disableSmoothScrollDuringRouteTransition)(()=>{if(""===b||"top"===b)return void window.scrollTo(0,0);let a=decodeURIComponent(b),c=document.getElementById(a);if(c)return void c.scrollIntoView();let d=document.getElementsByName(a)[0];d&&d.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(a)})}urlIsNew(a){return this.asPath!==a}async prefetch(a,b,c){void 0===b&&(b=a),void 0===c&&(c={});let d=(0,o.parseRelativeUrl)(a),e=d.pathname,{pathname:g,query:h}=d,i=g,j=await this.pageLoader.getPageList(),k=b,l=void 0!==c.locale?c.locale||void 0:this.locale,m=await J({asPath:b,locale:l,router:this});d.pathname=M(d.pathname,j),(0,n.isDynamicRoute)(d.pathname)&&(g=d.pathname,d.pathname=g,Object.assign(h,(0,p.getRouteMatcher)((0,q.getRouteRegex)(d.pathname))((0,s.parsePath)(b).pathname)||{}),m||(a=(0,r.formatWithValidation)(d)));let t=await N({fetchData:()=>Q({dataHref:this.pageLoader.getDataHref({href:(0,r.formatWithValidation)({pathname:i,query:h}),skipInterpolation:!0,asPath:k,locale:l}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:b,locale:l,router:this});if((null==t?void 0:t.effect.type)==="rewrite"&&(d.pathname=t.effect.resolvedHref,g=t.effect.resolvedHref,h={...h,...t.effect.parsedAs.query},k=t.effect.parsedAs.pathname,a=(0,r.formatWithValidation)(d)),(null==t?void 0:t.effect.type)==="redirect-external")return;let u=(0,f.removeTrailingSlash)(g);await this._bfl(b,k,c.locale,!0)&&(this.components[e]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(u).then(b=>!!b&&Q({dataHref:(null==t?void 0:t.json)?null==t?void 0:t.dataHref:this.pageLoader.getDataHref({href:a,asPath:k,locale:l}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:c.unstable_skipClientCache||c.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[c.priority?"loadPage":"prefetch"](u)])}async fetchComponent(a){let b=T({route:a,router:this});try{let c=await this.pageLoader.loadPage(a);return b(),c}catch(a){throw b(),a}}_getData(a){let b=!1,c=()=>{b=!0};return this.clc=c,a().then(a=>{if(c===this.clc&&(this.clc=null),b){let a=Object.defineProperty(Error("Loading initial props cancelled"),"__NEXT_ERROR_CODE",{value:"E405",enumerable:!1,configurable:!0});throw a.cancelled=!0,a}return a})}getInitialProps(a,b){let{Component:c}=this.components["/_app"],d=this._wrapApp(c);return b.AppTree=d,(0,m.loadGetInitialProps)(c,{AppTree:d,Component:a,router:this,ctx:b})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(a,b,c,{initialProps:d,pageLoader:e,App:g,wrapApp:h,Component:i,err:j,subscription:k,isFallback:l,locale:p,locales:q,defaultLocale:s,domainLocales:t,isPreview:u}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=R(),this.onPopState=a=>{let b,{isFirstPopStateEvent:c}=this;this.isFirstPopStateEvent=!1;let d=a.state;if(!d){let{pathname:a,query:b}=this;this.changeState("replaceState",(0,r.formatWithValidation)({pathname:(0,w.addBasePath)(a),query:b}),(0,m.getURL)());return}if(d.__NA)return void window.location.reload();if(!d.__N||c&&this.locale===d.options.locale&&d.as===this.asPath)return;let{url:e,as:f,options:g,key:h}=d;this._key=h;let{pathname:i}=(0,o.parseRelativeUrl)(e);(!this.isSsr||f!==(0,w.addBasePath)(this.asPath)||i!==(0,w.addBasePath)(this.pathname))&&(!this._bps||this._bps(d))&&this.change("replaceState",e,f,Object.assign({},g,{shallow:g.shallow&&this._shallow,locale:g.locale||this.defaultLocale,_h:0}),b)};let v=(0,f.removeTrailingSlash)(a);this.components={},"/_error"!==a&&(this.components[v]={Component:i,initial:!0,props:d,err:j,__N_SSG:d&&d.__N_SSG,__N_SSP:d&&d.__N_SSP}),this.components["/_app"]={Component:g,styleSheets:[]},this.events=U.events,this.pageLoader=e;let x=(0,n.isDynamicRoute)(a)&&self.__NEXT_DATA__.autoExport;this.basePath="",this.sub=k,this.clc=null,this._wrapApp=h,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!x&&!self.location.search),this.state={route:v,pathname:a,query:b,asPath:x?a:c,isPreview:!!u,locale:void 0,isFallback:l},this._initialMatchesMiddlewarePromise=Promise.resolve(!1)}}U.events=(0,l.default)()},4841:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{cancelIdleCallback:function(){return d},requestIdleCallback:function(){return c}});let c="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let b=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-b))}})},1)},d="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},4937:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});var d=c(8732),e=c(2015);let f=({card:a,userImages:b=[],size:c="medium",showUserPhotos:f=!1,className:g=""})=>{let[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(0),[l,m]=(0,e.useState)(f),{ref:n,tiltStyles:o}=((a={})=>{let{maxTilt:b=15,perspective:c=1e3,scale:d=1.05,speed:f=600,reset:g=!0,easing:h="cubic-bezier(0.25, 0.46, 0.45, 0.94)"}=a,i=(0,e.useRef)(null),[j,k]=(0,e.useState)({tiltX:0,tiltY:0,scale:1,transform:""}),l=(0,e.useCallback)((a,e,f)=>{let g=f.left+f.width/2,h=(e-(f.top+f.height/2))/(f.height/2)*b,i=(g-a)/(f.width/2)*b,j=`perspective(${c}px) rotateX(${h}deg) rotateY(${i}deg) scale(${d})`;k({tiltX:h,tiltY:i,scale:d,transform:j})},[b,c,d]),m=(0,e.useCallback)(()=>{k({tiltX:0,tiltY:0,scale:1,transform:`perspective(${c}px) rotateX(0deg) rotateY(0deg) scale(1)`})},[c]),n=(0,e.useCallback)(a=>{if(!i.current)return;let b=i.current.getBoundingClientRect();l(a.clientX,a.clientY,b)},[l]),o=(0,e.useCallback)(()=>{i.current&&i.current.addEventListener("mousemove",n)},[n]),p=(0,e.useCallback)(()=>{i.current&&(i.current.removeEventListener("mousemove",n),g&&m())},[n,g,m]);(0,e.useEffect)(()=>{let a=i.current;if(a)return a.addEventListener("mouseenter",o),a.addEventListener("mouseleave",p),()=>{a.removeEventListener("mouseenter",o),a.removeEventListener("mouseleave",p),a.removeEventListener("mousemove",n)}},[o,p,n]);let q={transform:j.transform,transformStyle:"preserve-3d",transition:g?`transform ${f}ms ${h}`:"none"};return{ref:i,tiltState:j,tiltStyles:q,resetTilt:m}})({maxTilt:"large"===c?15:10,scale:1,speed:400,easing:"cubic-bezier(0.23, 1, 0.320, 1)"}),p=()=>["super rare","legendary","mythic"].includes(a.rarity.toLowerCase()),q=()=>{let b=a.rarity.toLowerCase().replace(/\s+/g,"");return`rarity-border-${b}`},r={small:"w-16 h-22",medium:"w-24 h-32",large:"w-48 h-64"},s=l&&b.length>0?b[j]:a.stock_image_url||a.image_url;if(!s||h)return(()=>{let b={MTG:"from-orange-400 to-red-500",POKEMON:"from-yellow-400 to-red-500",LORCANA:"from-purple-400 to-pink-500"}[a.game]||"from-gray-400 to-gray-600",e=q(),f=p()?"foil-rainbow":"";return(0,d.jsxs)("div",{ref:n,style:o,className:`${r[c]} bg-gradient-to-br ${b} rounded-lg flex flex-col items-center justify-center text-white shadow-md card-transition card-depth ${e} ${f} ${g}`,children:[(0,d.jsx)("div",{className:"text-lg font-bold mb-1",children:"\uD83C\uDCCF"}),(0,d.jsx)("div",{className:"text-xs text-center px-2 leading-tight",children:a.name.split(" ").slice(0,2).join(" ")}),(0,d.jsx)("div",{className:"text-xs opacity-75 mt-1",children:a.game})]})})();let t=q(),u=p()?"foil-card":"",v="legendary"===a.rarity.toLowerCase()||"mythic"===a.rarity.toLowerCase()?"holographic":"";return(0,d.jsxs)("div",{className:`relative ${g}`,children:[(0,d.jsx)("div",{ref:n,style:o,className:`card-transition card-depth ${t} ${u} ${v} rounded-lg`,children:(0,d.jsx)("img",{src:s,alt:a.name,className:`${r[c]} object-cover rounded-lg`,onError:()=>i(!0)})}),l&&b.length>0&&(0,d.jsxs)("div",{className:"absolute top-1 left-1 bg-blue-500 text-white text-xs px-1 py-0.5 rounded",children:["\uD83D\uDCF8 ",j+1,"/",b.length]}),b.length>0&&(0,d.jsx)("div",{className:"absolute bottom-1 right-1",children:(0,d.jsx)("button",{onClick:()=>m(!l),className:"bg-black bg-opacity-50 text-white text-xs px-1 py-0.5 rounded hover:bg-opacity-75",title:l?"Show stock image":"Show your photos",children:l?"\uD83D\uDCCB":"\uD83D\uDCF8"})}),l&&b.length>1&&(0,d.jsxs)("div",{className:"absolute bottom-1 left-1 flex gap-1",children:[(0,d.jsx)("button",{onClick:()=>k(a=>Math.max(0,a-1)),disabled:0===j,className:"bg-black bg-opacity-50 text-white text-xs px-1 py-0.5 rounded disabled:opacity-50",children:"‹"}),(0,d.jsx)("button",{onClick:()=>k(a=>Math.min(b.length-1,a+1)),disabled:j===b.length-1,className:"bg-black bg-opacity-50 text-white text-xs px-1 py-0.5 rounded disabled:opacity-50",children:"›"})]}),(0,d.jsx)("div",{className:"absolute top-1 right-1",children:l?(0,d.jsx)("span",{className:"bg-blue-500 text-white text-xs px-1 py-0.5 rounded",title:"Your card photo",children:"\uD83D\uDC64"}):(0,d.jsx)("span",{className:"bg-green-500 text-white text-xs px-1 py-0.5 rounded",title:"Stock image",children:"✓"})})]})}},5306:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{Router:function(){return f.default},createRouter:function(){return p},default:function(){return n},makePublicRouterInstance:function(){return q},useRouter:function(){return o},withRouter:function(){return i.default}});let d=c(7020),e=d._(c(2015)),f=d._(c(4828)),g=c(2088),h=d._(c(1644)),i=d._(c(3949)),j={router:null,readyCallbacks:[],ready(a){if(this.router)return a()}},k=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],l=["push","replace","reload","back","prefetch","beforePopState"];function m(){if(!j.router)throw Object.defineProperty(Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return j.router}Object.defineProperty(j,"events",{get:()=>f.default.events}),k.forEach(a=>{Object.defineProperty(j,a,{get:()=>m()[a]})}),l.forEach(a=>{j[a]=function(){for(var b=arguments.length,c=Array(b),d=0;d{j.ready(()=>{f.default.events.on(a,function(){for(var b=arguments.length,c=Array(b),d=0;da()),j.readyCallbacks=[],j.router}function q(a){let b={};for(let c of k){if("object"==typeof a[c]){b[c]=Object.assign(Array.isArray(a[c])?[]:{},a[c]);continue}b[c]=a[c]}return b.events=f.default.events,l.forEach(c=>{b[c]=function(){for(var b=arguments.length,d=Array(b),e=0;e{"use strict";c.d(b,{DP:()=>g,NP:()=>h});var d=c(8732),e=c(2015);let f=(0,e.createContext)(void 0),g=()=>{let a=(0,e.useContext)(f);if(void 0===a)throw Error("useTheme must be used within a ThemeProvider");return a},h=({children:a})=>{let[b,c]=(0,e.useState)(()=>localStorage.getItem("tcg-vault-theme")||"system"),[g,h]=(0,e.useState)("light");return(0,e.useEffect)(()=>{let a=()=>{"system"===b?h(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):h(b)};a();let c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{"system"===b&&a()};return c.addEventListener("change",d),()=>c.removeEventListener("change",d)},[b]),(0,e.useEffect)(()=>{let a=document.documentElement;"dark"===g?a.classList.add("dark"):a.classList.remove("dark");let c=document.querySelector('meta[name="theme-color"]');c&&c.setAttribute("content","dark"===g?"#0f172a":"#8b5cf6"),localStorage.setItem("tcg-vault-theme",b)},[b,g]),(0,d.jsx)(f.Provider,{value:{theme:b,effectiveTheme:g,setTheme:a=>{c(a)},toggleTheme:()=>{"light"===b?c("dark"):"dark"===b?c("system"):c("light")}},children:a})}},5678:(a,b,c)=>{"use strict";c.d(b,{A:()=>e});var d=c(8732);c(2015);let e=({children:a,rarity:b,className:c=""})=>(0,d.jsx)("div",{className:`${(()=>{let a=b.toLowerCase().replace(/\s+/g,"");return`rarity-border-${a}`})()} ${(()=>{switch(b.toLowerCase()){case"mythic":return"mythic-expansion premium-card-animation";case"legendary":case"super rare":return"premium-card-animation";default:return"card-expansion-organic"}})()} ${c}`,children:a})},5855:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>z});var e=c(8732);c(2015);var f=c(4233),g=c(9846),h=c(4589),i=c(4670),j=c(5533),k=c(3557),l=c(907),m=c(182),n=c(8249),o=c(452),p=c(717),q=c(9456),r=c(231),s=c(3771),t=c(4587),u=a([g,h,m,n,o]);[g,h,m,n,o]=u.then?(await u)():u;let v=({children:a})=>{let{user:b,isLoading:c}=(0,i.A)(),d=(0,f.useRouter)();return c?(0,e.jsx)("div",{className:"min-h-screen-safe flex items-center justify-center bg-white dark:bg-surface-900",children:(0,e.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center animate-bounce-subtle",children:(0,e.jsx)("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,e.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading TCG Vault..."})]})}):b?(0,e.jsx)(e.Fragment,{children:a}):(d.push("/login"),null)},w=({children:a})=>{let{user:b,isLoading:c}=(0,i.A)(),d=(0,f.useRouter)();return c?(0,e.jsx)("div",{className:"min-h-screen-safe flex items-center justify-center bg-white dark:bg-surface-900",children:(0,e.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center animate-bounce-subtle",children:(0,e.jsx)("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,e.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading TCG Vault..."})]})}):b?(d.push("/dashboard"),null):(0,e.jsx)(e.Fragment,{children:a})},x=({children:a})=>(0,e.jsx)(k.A,{children:a}),y=({children:a})=>(0,e.jsx)("div",{className:"min-h-screen-safe bg-gradient-to-br from-primary-50 via-white to-accent-50 dark:from-surface-900 dark:via-surface-800 dark:to-surface-900 flex items-center justify-center px-4 transition-colors",children:(0,e.jsx)("div",{className:"w-full max-w-sm animate-slide-up",children:a})}),z=function(){let a=(0,f.useRouter)(),{pathname:b}=a;return(0,e.jsxs)(j.NP,{children:["/login"===b&&(0,e.jsx)(w,{children:(0,e.jsx)(y,{children:(0,e.jsx)(r.A,{})})}),"/register"===b&&(0,e.jsx)(w,{children:(0,e.jsx)(y,{children:(0,e.jsx)(s.A,{})})}),"/dashboard"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(l.A,{})})}),"/collections"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(m.A,{})})}),"/decks"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(n.A,{})})}),"/cards"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(o.A,{})})}),"/scanner"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(p.A,{})})}),"/settings"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(q.A,{})})}),"/admin"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(t.A,{})})}),"/"===b&&(0,e.jsx)(v,{children:(0,e.jsx)(x,{children:(0,e.jsx)(l.A,{})})}),!["/login","/register","/dashboard","/collections","/decks","/cards","/scanner","/settings","/admin","/"].includes(b)&&(0,e.jsx)(x,{children:(0,e.jsxs)("div",{className:"text-center py-12",children:[(0,e.jsx)("div",{className:"w-16 h-16 bg-surface-200 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,e.jsx)("svg",{className:"w-8 h-8 text-surface-500 dark:text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,e.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white mb-2",children:"Page Not Found"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:"The page you're looking for doesn't exist."}),(0,e.jsx)("button",{onClick:()=>a.back(),className:"bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-xl font-medium transition-colors",children:"Go Back"})]})}),(0,e.jsx)(g.Analytics,{}),(0,e.jsx)(h.SpeedInsights,{})]})};d()}catch(a){d(a)}})},5891:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>k});var e=c(8732),f=c(2015),g=c(8462),h=c(6659),i=c(1862),j=a([g,h,i]);[g,h,i]=j.then?(await j)():j;let k=({isOpen:a,onClose:b,onCardSelect:c})=>{let[d,j]=(0,f.useState)(""),[k,l]=(0,f.useState)(""),[m,n]=(0,f.useState)({game:"",rarity:"",status:"all"}),[o,p]=(0,f.useState)(null),[q,r]=(0,f.useState)(!1);(0,f.useEffect)(()=>{let a=setTimeout(()=>{l(d)},300);return()=>clearTimeout(a)},[d]);let{data:s=[],isLoading:t}=(0,g.useQuery)({queryKey:["card-search",k,m],queryFn:()=>k.trim()?h.LO.cards.searchCards(k,m):h.LO.cards.getAllCards(m),enabled:a});return a?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:b,children:(0,e.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl h-[90vh] overflow-hidden animate-slide-up",children:[(0,e.jsxs)("div",{className:"p-4 pb-0",children:[(0,e.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-4"}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,e.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"Browse Cards"}),(0,e.jsx)("button",{onClick:b,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,e.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,e.jsxs)("div",{className:"relative mb-4",children:[(0,e.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,e.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,e.jsx)("input",{type:"text",value:d,onChange:a=>j(a.target.value),placeholder:"Search cards...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,e.jsxs)("div",{className:"flex space-x-2 mb-4 overflow-x-auto pb-2",children:[(0,e.jsxs)("select",{value:m.game,onChange:a=>n(b=>({...b,game:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"",children:"All Games"}),(0,e.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,e.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,e.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,e.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]}),(0,e.jsxs)("select",{value:m.rarity,onChange:a=>n(b=>({...b,rarity:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"",children:"All Rarities"}),(0,e.jsx)("option",{value:"Common",children:"Common"}),(0,e.jsx)("option",{value:"Uncommon",children:"Uncommon"}),(0,e.jsx)("option",{value:"Rare",children:"Rare"}),(0,e.jsx)("option",{value:"Super Rare",children:"Super Rare"}),(0,e.jsx)("option",{value:"Legendary",children:"Legendary"}),(0,e.jsx)("option",{value:"Mythic",children:"Mythic"})]})]})]}),(0,e.jsx)("div",{className:"flex-1 overflow-y-auto px-4 pb-4",onClick:a=>a.stopPropagation(),children:t?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsxs)("div",{className:"flex flex-col items-center",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,e.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,e.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Searching cards..."})]})}):0===s.length?(0,e.jsxs)("div",{className:"text-center py-12",children:[(0,e.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-4",children:(0,e.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,e.jsx)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white mb-2",children:"No cards found"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:"Try adjusting your search or filters"})]}):(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400 mb-4",children:[s.length," cards found"]}),s.map(a=>(0,e.jsxs)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-colors",children:[(0,e.jsxs)("div",{className:"flex items-start space-x-4",children:[(0,e.jsx)("div",{className:"w-12 h-16 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center flex-shrink-0",children:a.image_url?(0,e.jsx)("img",{src:a.image_url,alt:a.name,className:"w-full h-full object-cover rounded-lg"}):(0,e.jsx)("svg",{className:"w-4 h-4 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",children:a.name}),(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 truncate",children:a.set_name}),(0,e.jsx)("p",{className:"text-xs text-surface-500 dark:text-surface-500 mt-1",children:a.card_type}),(0,e.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(a.game)}`,children:a.game}),(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a.toLowerCase()){case"common":default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300";case"uncommon":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"rare":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"super rare":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"legendary":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"mythic":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}})(a.rarity)}`,children:a.rarity})]}),a.current_price&&(0,e.jsxs)("p",{className:"text-sm font-medium text-green-600 dark:text-green-400 mt-2",children:["$",a.current_price.toFixed(2)]})]}),(0,e.jsx)("button",{onClick:()=>{p(a),r(!0)},className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white p-2 rounded-xl transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5 flex-shrink-0",children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]}),(a.mana_cost||a.power&&a.toughness)&&(0,e.jsxs)("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-surface-200 dark:border-surface-700",children:[a.mana_cost&&(0,e.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:["Mana Cost: ",a.mana_cost]}),a.power&&a.toughness&&(0,e.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:[a.power,"/",a.toughness]})]})]},a.id))]})})]})}),q&&o&&(0,e.jsx)(i.A,{isOpen:q,onClose:()=>{r(!1),p(null)},initialCardData:o})]}):null};d()}catch(a){d(a)}})},5939:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"parseRelativeUrl",{enumerable:!0,get:function(){return e}}),c(4718);let d=c(7536);function e(a,b,c){void 0===c&&(c=!0);let e=new URL("http://n"),f=b?new URL(b,e):a.startsWith(".")?new URL("http://n"):e,{pathname:g,searchParams:h,search:i,hash:j,href:k,origin:l}=new URL(a,f);if(l!==e.origin)throw Object.defineProperty(Error("invariant: invalid relative URL, router received "+a),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:g,query:c?(0,d.searchParamsToUrlQuery)(h):void 0,search:i,hash:j,href:k.slice(l.length),slashes:void 0}}},6092:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addBasePath",{enumerable:!0,get:function(){return f}});let d=c(6655),e=c(7779);function f(a,b){return(0,e.normalizePathTrailingSlash)((0,d.addPathPrefix)(a,""))}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},6231:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"resolveHref",{enumerable:!0,get:function(){return l}});let d=c(7536),e=c(2848),f=c(8410),g=c(4718),h=c(7779),i=c(651),j=c(6275),k=c(3563);function l(a,b,c){let l,m="string"==typeof b?b:(0,e.formatWithValidation)(b),n=m.match(/^[a-z][a-z0-9+.-]*:\/\//i),o=n?m.slice(n[0].length):m;if((o.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+m+"' passed to next/router in page: '"+a.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let b=(0,g.normalizeRepeatedSlashes)(o);m=(n?n[0]:"")+b}if(!(0,i.isLocalURL)(m))return c?[m]:m;try{l=new URL(m.startsWith("#")?a.asPath:a.pathname,"http://n")}catch(a){l=new URL("/","http://n")}try{let a=new URL(m,l);a.pathname=(0,h.normalizePathTrailingSlash)(a.pathname);let b="";if((0,j.isDynamicRoute)(a.pathname)&&a.searchParams&&c){let c=(0,d.searchParamsToUrlQuery)(a.searchParams),{result:g,params:h}=(0,k.interpolateAs)(a.pathname,a.pathname,c);g&&(b=(0,e.formatWithValidation)({pathname:g,hash:a.hash,query:(0,f.omit)(c,h)}))}let g=a.origin===l.origin?a.href.slice(a.origin.length):a.href;return c?[g,b||g]:g}catch(a){return c?[m]:m}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},6659:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LO:()=>i});var e=c(1428),f=a([e]);e=(f.then?(await f)():f)[0];let g=process.env.REACT_APP_API_URL||"https://tcg-vault.vercel.app",h=e.default.create({baseURL:g,timeout:1e4,headers:{"Content-Type":"application/json"}});h.interceptors.request.use(a=>{let b=localStorage.getItem("tcg-vault-token");return b&&(a.headers.Authorization=`Bearer ${b}`),a}),h.interceptors.response.use(a=>a,a=>(a.response?.status===401&&(localStorage.removeItem("tcg-vault-token"),window.location.href="/login"),Promise.reject(a)));let i={cards:{getAllCards:async a=>(await h.get("/api/cards",{params:a})).data.data,getCard:async a=>(await h.get(`/api/cards/${a}`)).data.data,searchCards:async(a,b)=>(await h.get("/api/cards/search",{params:{q:a,...b}})).data.data,getUserCards:async a=>(await h.get("/api/user-cards",{params:a})).data.data,getUserCard:async a=>(await h.get(`/api/user-cards/${a}`)).data.data,addCard:async a=>(await h.post("/api/user-cards",a)).data.data,updateCard:async(a,b)=>(await h.put(`/api/user-cards/${a}`,b)).data.data,deleteCard:async a=>{await h.delete(`/api/user-cards/${a}`)},bulkAddCards:async a=>(await h.post("/api/user-cards/bulk",{cards:a})).data.data,bulkUpdateCards:async a=>(await h.put("/api/user-cards/bulk",{updates:a})).data.data,bulkDeleteCards:async a=>{await h.delete("/api/user-cards/bulk",{data:{ids:a}})},moveCardsToCollection:async(a,b)=>{await h.post("/api/user-cards/move-to-collection",{cardIds:a,collectionId:b})},moveCardsToDeck:async(a,b)=>{await h.post("/api/user-cards/move-to-deck",{cardIds:a,deckId:b})}},collections:{getCollections:async a=>(await h.get("/api/collections",{params:a})).data.data,getCollection:async(a,b=!0)=>(await h.get(`/api/collections/${a}`,{params:{include_cards:b}})).data.data,createCollection:async a=>(await h.post("/api/collections",a)).data.data,updateCollection:async(a,b)=>(await h.put(`/api/collections/${a}`,b)).data.data,deleteCollection:async a=>{await h.delete(`/api/collections/${a}`)},addCardsToCollection:async(a,b)=>{await h.post(`/api/collections/${a}/cards`,{cardIds:b})},removeCardsFromCollection:async(a,b)=>{await h.delete(`/api/collections/${a}/cards`,{data:{cardIds:b}})},getCollectionStats:async a=>(await h.get(`/api/collections/${a}/stats`)).data.data,duplicateCollection:async(a,b)=>(await h.post(`/api/collections/${a}/duplicate`,{name:b})).data.data,exportCollection:async(a,b)=>(await h.get(`/api/collections/${a}/export`,{params:{format:b},responseType:"blob"})).data},decks:{getDecks:async a=>(await h.get("/api/decks",{params:a})).data.data,getDeck:async a=>(await h.get(`/api/decks/${a}`)).data.data,createDeck:async a=>(await h.post("/api/decks",a)).data.data,updateDeck:async(a,b)=>(await h.put(`/api/decks/${a}`,b)).data.data,deleteDeck:async a=>{await h.delete(`/api/decks/${a}`)},addCardToDeck:async(a,b,c,d="mainboard")=>{await h.post(`/api/decks/${a}/cards`,{cardId:b,quantity:c,board:d})},updateDeckCard:async(a,b,c,d="mainboard")=>{await h.put(`/api/decks/${a}/cards/${b}`,{quantity:c,board:d})},removeDeckCard:async(a,b)=>{await h.delete(`/api/decks/${a}/cards/${b}`)},validateDeck:async a=>(await h.get(`/api/decks/${a}/validate`)).data.data,getDeckStats:async a=>(await h.get(`/api/decks/${a}/stats`)).data.data,importDeck:async a=>(await h.post("/api/decks/import",a)).data.data,exportDeck:async(a,b)=>(await h.get(`/api/decks/${a}/export`,{params:{format:b}})).data.data,duplicateDeck:async(a,b)=>(await h.post(`/api/decks/${a}/duplicate`,{name:b})).data.data},tags:{getTags:async()=>(await h.get("/api/tags")).data.data,createTag:async a=>(await h.post("/api/tags",a)).data.data,updateTag:async(a,b)=>(await h.put(`/api/tags/${a}`,b)).data.data,deleteTag:async a=>{await h.delete(`/api/tags/${a}`)},getEntitiesByTag:async a=>(await h.get(`/api/tags/${a}/entities`)).data.data},stats:{getUserStats:async()=>(await h.get("/api/stats")).data.data,getPriceAlerts:async()=>(await h.get("/api/stats/price-alerts")).data.data},scanner:{processOCR:async a=>(await h.post("/api/scanner/ocr",{imageData:a})).data.data,addScannedCards:async a=>(await h.post("/api/scanner/add-cards",{cards:a})).data.data},utils:{healthCheck:async()=>(await h.get("/api/health")).data,uploadImage:async a=>{let b=new FormData;return b.append("image",a),(await h.post("/api/upload",b,{headers:{"Content-Type":"multipart/form-data"}})).data.data}}};d()}catch(a){d(a)}})},7145:(a,b)=>{"use strict";function c(a,b){let c=Object.keys(a);if(c.length!==Object.keys(b).length)return!1;for(let d=c.length;d--;){let e=c[d];if("query"===e){let c=Object.keys(a.query);if(c.length!==Object.keys(b.query).length)return!1;for(let d=c.length;d--;){let e=c[d];if(!b.query.hasOwnProperty(e)||a.query[e]!==b.query[e])return!1}}else if(!b.hasOwnProperty(e)||a[e]!==b[e])return!1}return!0}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"compareRouterStates",{enumerable:!0,get:function(){return c}})},7536:(a,b)=>{"use strict";function c(a){let b={};for(let[c,d]of a.entries()){let a=b[c];void 0===a?b[c]=d:Array.isArray(a)?a.push(d):b[c]=[a,d]}return b}function d(a){return"string"==typeof a?a:("number"!=typeof a||isNaN(a))&&"boolean"!=typeof a?"":String(a)}function e(a){let b=new URLSearchParams;for(let[c,e]of Object.entries(a))if(Array.isArray(e))for(let a of e)b.append(c,d(a));else b.set(c,d(e));return b}function f(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>j});var e=c(8732),f=c(2015),g=c(8462),h=c(1735),i=a([g]);g=(i.then?(await i)():i)[0];let j=({isOpen:a,onClose:b,onCardSelect:c})=>{let[d,i]=(0,f.useState)(""),[j,k]=(0,f.useState)(""),[l,m]=(0,f.useState)(""),[n,o]=(0,f.useState)(null),[p,q]=(0,f.useState)(!1),[r,s]=(0,f.useState)(!1),[t,u]=(0,f.useState)("cards"),v=(0,g.useQueryClient)();(0,f.useEffect)(()=>{let a=setTimeout(()=>{k(d)},500);return()=>clearTimeout(a)},[d]);let{data:w=[],isLoading:x}=(0,g.useQuery)({queryKey:["external-cards",j,l],queryFn:async()=>{if(!j.trim())return[];s(!0);try{let a=await h.Ay.searchCards(j,l||void 0);return console.log(`Found ${a.length} cards for search "${j}" in game "${l}"`),a}catch(a){return console.error("Error searching external cards:",a),[]}finally{s(!1)}},enabled:!!j.trim()&&a,staleTime:3e5,retry:2}),{data:y=[]}=(0,g.useQuery)({queryKey:["random-cards",l],queryFn:async()=>{try{let a=await h.Ay.getRandomCards(20,l||void 0);return console.log(`Found ${a.length} random cards for game "${l}"`),a}catch(a){return console.error("Error fetching random cards:",a),[]}},enabled:a&&!j.trim(),staleTime:6e5,retry:2}),z=(0,g.useMutation)({mutationFn:async a=>{let b=await fetch("/api/cards/find-or-create",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("tcg-vault-token")}`},body:JSON.stringify({name:a.name,game:a.game,setName:a.set_name,setCode:a.set_code,rarity:a.rarity,cardType:a.card_type,manaCost:a.mana_cost,imageUrl:a.stock_image_url})});if(!b.ok)throw Error("Failed to add card to database");return(await b.json()).card},onSuccess:()=>{v.invalidateQueries({queryKey:["cards"]})}}),A=async a=>{c?(c(a),b()):(o(a),q(!0))},B=async a=>{try{await z.mutateAsync(a),alert(`${a.name} has been added to the database!`)}catch(a){console.error("Error adding card to database:",a),alert("Failed to add card to database. Please try again.")}},C=a=>{switch(a){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}},D=a=>{switch(a?.toLowerCase()){case"common":default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300";case"uncommon":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"rare":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"super rare":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"legendary":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"mythic":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}};if(!a)return null;let E=j.trim()?w:y,F=x||r;return console.log("CardDatabaseBrowser state:",{isOpen:a,searchTerm:d,debouncedSearch:j,selectedGame:l,externalCards:w.length,randomCards:y.length,displayCards:E.length,isLoading:F}),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:b,children:(0,e.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl h-[90vh] overflow-hidden animate-slide-up",onClick:a=>a.stopPropagation(),children:(0,e.jsxs)("div",{className:"p-4 pb-0",children:[(0,e.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-4"}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,e.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"Card Database Browser"}),(0,e.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),b()},className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,e.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,e.jsxs)("div",{className:"relative mb-4",children:[(0,e.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,e.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,e.jsx)("input",{type:"text",value:d,onChange:a=>i(a.target.value),onKeyDown:a=>a.stopPropagation(),onClick:a=>a.stopPropagation(),placeholder:"Search cards from external databases...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,e.jsxs)("div",{className:"flex space-x-2 mb-4 overflow-x-auto pb-2",children:[(0,e.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),m("")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${!l?"bg-primary-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"All Games"}),(0,e.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),m("MTG")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"MTG"===l?"bg-orange-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Magic: The Gathering"}),(0,e.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),m("POKEMON")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"POKEMON"===l?"bg-yellow-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Pok\xe9mon"}),(0,e.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),m("YUGIOH")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"YUGIOH"===l?"bg-blue-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Yu-Gi-Oh!"}),(0,e.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),m("LORCANA")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"LORCANA"===l?"bg-purple-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Disney Lorcana"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-surface-700 dark:text-surface-300",children:"View:"}),(0,e.jsxs)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),u("cards")},className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${"cards"===t?"bg-primary-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600"}`,children:[(0,e.jsx)("svg",{className:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),"Cards"]}),(0,e.jsxs)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),u("table")},className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${"table"===t?"bg-primary-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600"}`,children:[(0,e.jsx)("svg",{className:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H6a2 2 0 00-2 2v8a2 2 0 002 2z"})}),"Table"]})]}),E.length>0&&(0,e.jsxs)("span",{className:"text-sm text-surface-600 dark:text-surface-400",children:[E.length," card",1!==E.length?"s":""]})]}),(0,e.jsx)("div",{className:"flex-1 overflow-y-auto pb-20",children:F?(0,e.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,e.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500"}),(0,e.jsx)("span",{className:"ml-3 text-surface-600 dark:text-surface-400",children:"Searching external databases..."})]}):0===E.length?(0,e.jsxs)("div",{className:"text-center py-8",children:[(0,e.jsx)("div",{className:"text-6xl mb-4",children:"\uD83D\uDD0D"}),(0,e.jsx)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white mb-2",children:j.trim()?"No cards found":"Discover Cards"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:j.trim()?"Try adjusting your search terms or game filter":"Search for cards to see results from external databases"})]}):(0,e.jsxs)(e.Fragment,{children:["cards"===t&&(0,e.jsx)("div",{className:"grid grid-cols-1 gap-4",children:E.map(a=>(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-all duration-200 hover:shadow-md",children:(0,e.jsxs)("div",{className:"flex items-start space-x-4",children:[(0,e.jsx)("div",{className:"w-16 h-20 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center flex-shrink-0",children:a.stock_image_url?(0,e.jsx)("img",{src:a.stock_image_url,alt:a.name,className:"w-full h-full object-cover rounded-lg"}):(0,e.jsx)("svg",{className:"w-6 h-6 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",children:a.name}),(0,e.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:[a.set_name," • ",a.card_number]}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-2 mt-2",children:[(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${C(a.game)}`,children:a.game}),a.rarity&&(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${D(a.rarity)}`,children:a.rarity}),a.current_price&&(0,e.jsxs)("span",{className:"px-2 py-1 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300 rounded-full text-xs font-medium",children:["$",a.current_price]})]})]}),(0,e.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,e.jsx)("button",{type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),A(a)},className:"px-3 py-1 bg-primary-500 hover:bg-primary-600 text-white text-xs font-medium rounded-lg transition-colors",children:"Add to Collection"}),(0,e.jsx)("button",{type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),B(a)},disabled:z.isPending,className:"px-3 py-1 bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-700 dark:text-surface-300 text-xs font-medium rounded-lg transition-colors disabled:opacity-50",children:z.isPending?"Adding...":"Add to DB"})]})]})},`${a.game}-${a.id}`))}),"table"===t&&(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 overflow-hidden",children:(0,e.jsx)("div",{className:"overflow-x-auto",children:(0,e.jsxs)("table",{className:"w-full",children:[(0,e.jsx)("thead",{className:"bg-surface-50 dark:bg-surface-700",children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Card"}),(0,e.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Set"}),(0,e.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Game"}),(0,e.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Rarity"}),(0,e.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Price"}),(0,e.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Actions"})]})}),(0,e.jsx)("tbody",{className:"divide-y divide-surface-200 dark:divide-surface-700",children:E.map(a=>(0,e.jsxs)("tr",{className:"hover:bg-surface-50 dark:hover:bg-surface-700 transition-colors",children:[(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,e.jsx)("div",{className:"w-10 h-12 bg-surface-200 dark:bg-surface-700 rounded flex items-center justify-center flex-shrink-0",children:a.stock_image_url?(0,e.jsx)("img",{src:a.stock_image_url,alt:a.name,className:"w-full h-full object-cover rounded"}):(0,e.jsx)("svg",{className:"w-4 h-4 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-surface-900 dark:text-white truncate",children:a.name}),(0,e.jsxs)("div",{className:"text-xs text-surface-500 dark:text-surface-400",children:["#",a.card_number]})]})]})}),(0,e.jsx)("td",{className:"px-4 py-3 text-sm text-surface-900 dark:text-white",children:a.set_name}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${C(a.game)}`,children:a.game})}),(0,e.jsx)("td",{className:"px-4 py-3",children:a.rarity&&(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${D(a.rarity)}`,children:a.rarity})}),(0,e.jsx)("td",{className:"px-4 py-3 text-sm text-surface-900 dark:text-white",children:a.current_price?`$${a.current_price}`:"-"}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsxs)("div",{className:"flex space-x-2",children:[(0,e.jsx)("button",{type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),A(a)},className:"px-2 py-1 bg-primary-500 hover:bg-primary-600 text-white text-xs font-medium rounded transition-colors",children:"Add"}),(0,e.jsx)("button",{type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),B(a)},disabled:z.isPending,className:"px-2 py-1 bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-700 dark:text-surface-300 text-xs font-medium rounded transition-colors disabled:opacity-50",children:"DB"})]})})]},`${a.game}-${a.id}`))})]})})})]})})]})})}),n&&p&&(0,e.jsx)("div",{className:"fixed inset-0 z-60",children:(0,e.jsx)("div",{className:"fixed inset-0 bg-black/50",onClick:()=>q(!1),children:(0,e.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl p-6 max-h-[80vh] overflow-y-auto",children:(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsxs)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white mb-4",children:["Add ",n.name," to your collection"]}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:"This card will be added to your collection with the details you specify."}),(0,e.jsxs)("div",{className:"flex space-x-4",children:[(0,e.jsx)("button",{onClick:()=>{A(n),q(!1)},className:"flex-1 bg-primary-500 hover:bg-primary-600 text-white font-medium py-3 px-6 rounded-xl transition-colors",children:"Continue"}),(0,e.jsx)("button",{onClick:()=>q(!1),className:"flex-1 bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-700 dark:text-surface-300 font-medium py-3 px-6 rounded-xl transition-colors",children:"Cancel"})]})]})})})})]})};d()}catch(a){d(a)}})},7779:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return f}});let d=c(1730),e=c(6290),f=a=>{if(!a.startsWith("/"))return a;let{pathname:b,query:c,hash:f}=(0,e.parsePath)(a);return""+(0,d.removeTrailingSlash)(b)+c+f};("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},7825:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{HTML_LIMITED_BOT_UA_RE:function(){return d.HTML_LIMITED_BOT_UA_RE},HTML_LIMITED_BOT_UA_RE_STRING:function(){return f},getBotType:function(){return i},isBot:function(){return h}});let d=c(8537),e=/google/i,f=d.HTML_LIMITED_BOT_UA_RE.source;function g(a){return d.HTML_LIMITED_BOT_UA_RE.test(a)}function h(a){return e.test(a)||g(a)}function i(a){return e.test(a)?"dom":g(a)?"html":void 0}},7980:(a,b,c)=>{"use strict";function d(a,b){return a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"removeLocale",{enumerable:!0,get:function(){return d}}),c(6290),("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},8249:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>k});var e=c(8732),f=c(2015),g=c(8462),h=c(6659),i=c(9582),j=a([g,h,i]);[g,h,i]=j.then?(await j)():j;let k=()=>{let a=(0,g.useQueryClient)(),[b,c]=(0,f.useState)(!1),[d,j]=(0,f.useState)(null),[k,l]=(0,f.useState)({search:"",game:"",format:"",isFavorite:!1}),[m,n]=(0,f.useState)("grid"),{data:o=[],isLoading:p}=(0,g.useQuery)({queryKey:["decks",k],queryFn:()=>h.LO.decks.getDecks(k)}),q=(0,g.useMutation)({mutationFn:h.LO.decks.deleteDeck,onSuccess:()=>{a.invalidateQueries({queryKey:["decks"]})}}),r=(0,g.useMutation)({mutationFn:({id:a,isFavorite:b})=>h.LO.decks.updateDeck(a,{isFavorite:b}),onSuccess:()=>{a.invalidateQueries({queryKey:["decks"]})}}),s=o.filter(a=>{let b=!k.search||a.name.toLowerCase().includes(k.search.toLowerCase())||a.description?.toLowerCase().includes(k.search.toLowerCase()),c=!k.game||a.game===k.game,d=!k.format||a.format===k.format,e=!k.isFavorite||a.isFavorite;return b&&c&&d&&e});return(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:"My Decks"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mt-1",children:"Build and manage your card decks"})]}),(0,e.jsxs)("button",{onClick:()=>c(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,e.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"New Deck"]})]}),(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4",children:(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,e.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,e.jsx)("input",{type:"text",value:k.search,onChange:a=>l(b=>({...b,search:a.target.value})),placeholder:"Search decks...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex space-x-2 overflow-x-auto pb-2",children:[(0,e.jsxs)("select",{value:k.game,onChange:a=>l(b=>({...b,game:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"",children:"All Games"}),(0,e.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,e.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,e.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,e.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]}),(0,e.jsxs)("select",{value:k.format,onChange:a=>l(b=>({...b,format:a.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,e.jsx)("option",{value:"",children:"All Formats"}),(0,e.jsx)("option",{value:"standard",children:"Standard"}),(0,e.jsx)("option",{value:"modern",children:"Modern"}),(0,e.jsx)("option",{value:"commander",children:"Commander"}),(0,e.jsx)("option",{value:"pioneer",children:"Pioneer"}),(0,e.jsx)("option",{value:"legacy",children:"Legacy"}),(0,e.jsx)("option",{value:"vintage",children:"Vintage"})]}),(0,e.jsx)("button",{onClick:()=>l(a=>({...a,isFavorite:!a.isFavorite})),className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${k.isFavorite?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300":"bg-surface-50 dark:bg-surface-700 text-surface-700 dark:text-surface-300 border border-surface-300 dark:border-surface-600"}`,children:"⭐ Favorites"})]}),(0,e.jsxs)("div",{className:"flex bg-surface-100 dark:bg-surface-700 rounded-lg p-1",children:[(0,e.jsx)("button",{onClick:()=>n("grid"),className:`p-2 rounded-md transition-colors ${"grid"===m?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}),(0,e.jsx)("button",{onClick:()=>n("list"),className:`p-2 rounded-md transition-colors ${"list"===m?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})})]})]})]})}),p?(0,e.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,e.jsxs)("div",{className:"flex flex-col items-center",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,e.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,e.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading decks..."})]})}):0===s.length?(0,e.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-8",children:(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,e.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,e.jsx)("h3",{className:"text-xl font-semibold text-surface-900 dark:text-white mb-2",children:0===o.length?"No decks yet":"No matching decks"}),(0,e.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:0===o.length?"Start building your first deck from your collection":"Try adjusting your search or filters"}),0===o.length&&(0,e.jsx)("button",{onClick:()=>c(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-6 py-3 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:"Create Deck"})]})}):(0,e.jsx)("div",{className:"grid"===m?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4":"space-y-4",children:s.map(a=>(0,e.jsxs)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-all duration-200 hover:shadow-md",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,e.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,e.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:a.color||"#8b5cf6"},children:"\uD83C\uDFB4"}),(0,e.jsxs)("div",{className:"flex-1",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:a.name}),a.description&&(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 line-clamp-2",children:a.description})]})]}),(0,e.jsx)("button",{onClick:()=>(a=>{r.mutate({id:a.id,isFavorite:!a.isFavorite})})(a),className:`p-2 rounded-lg transition-colors ${a.isFavorite?"text-yellow-500 hover:text-yellow-600":"text-surface-400 hover:text-yellow-500"}`,children:(0,e.jsx)("svg",{className:"w-5 h-5",fill:a.isFavorite?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,e.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-surface-600 dark:text-surface-400",children:[(0,e.jsxs)("span",{children:[a.totalCards||0," cards"]}),a.totalValue&&(0,e.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-medium",children:["$",a.totalValue.toFixed(2)]})]}),(0,e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(a.game)}`,children:a.game}),a.format&&(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a.toLowerCase()){case"standard":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"modern":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"commander":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"pioneer":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"legacy":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300";case"vintage":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(a.format)}`,children:a.format})]})]}),(0,e.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,e.jsxs)("div",{className:"flex items-center space-x-2",children:[void 0!==a.isLegal&&(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${a.isLegal?"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300":"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}`,children:a.isLegal?"✅ Legal":"❌ Illegal"}),a.averageManaValue&&(0,e.jsxs)("span",{className:"px-2 py-1 bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 rounded-full text-xs font-medium",children:[a.averageManaValue.toFixed(1)," CMC"]})]})}),(0,e.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,e.jsx)("button",{onClick:()=>{},className:"flex-1 bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 py-2 px-3 rounded-lg text-sm font-medium hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors",children:"View Deck"}),(0,e.jsx)("button",{onClick:()=>j(a.id),className:"p-2 text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 rounded-lg transition-colors",children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,e.jsx)("button",{onClick:()=>{var b,c;return b=a.id,c=a.name,void(window.confirm(`Are you sure you want to delete "${c}"? This action cannot be undone.`)&&q.mutate(b))},className:"p-2 text-red-400 hover:text-red-600 rounded-lg transition-colors",disabled:q.isPending,children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]},a.id))}),(0,e.jsx)(i.A,{isOpen:b||!!d,onClose:()=>{c(!1),j(null)},deckId:d||void 0})]})};d()}catch(a){d(a)}})},8333:(a,b)=>{"use strict";function c(a,b){return void 0===b&&(b=""),("/"===a?"/index":/^\/index(\/|$)/.test(a)?"/index"+a:a)+b}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return c}})},8410:(a,b)=>{"use strict";function c(a,b){let c={};return Object.keys(a).forEach(d=>{b.includes(d)||(c[d]=a[d])}),c}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"omit",{enumerable:!0,get:function(){return c}})},8537:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"HTML_LIMITED_BOT_UA_RE",{enumerable:!0,get:function(){return c}});let c=/Mediapartners-Google|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti/i},8542:(a,b)=>{"use strict";let c;function d(a){return(null==c?void 0:c.createScriptURL(a))||a}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return d}}),("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},8550:(a,b,c)=>{(()=>{var b={154:(a,b,c)=>{var d=c(781),e=["write","end","destroy"],f=["resume","pause"],g=["data","close"],h=Array.prototype.slice;function i(a,b){if(a.forEach)return a.forEach(b);for(var c=0;c{"use strict";let d=c(147),e=c(781),f=c(796),g=c(154),h=c(530),i=a=>Object.assign({level:9},a);a.exports=(a,b)=>a?h(f.gzip)(a,i(b)).then(a=>a.length).catch(a=>0):Promise.resolve(0),a.exports.sync=(a,b)=>f.gzipSync(a,i(b)).length,a.exports.stream=a=>{let b=new e.PassThrough,c=new e.PassThrough,d=g(b,c),h=0,j=f.createGzip(i(a)).on("data",a=>{h+=a.length}).on("error",()=>{d.gzipSize=0}).on("end",()=>{d.gzipSize=h,d.emit("gzip-size",h),c.end()});return b.pipe(j),b.pipe(c,{end:!1}),d},a.exports.file=(b,c)=>new Promise((e,f)=>{let g=d.createReadStream(b);g.on("error",f);let h=g.pipe(a.exports.stream(c));h.on("error",f),h.on("gzip-size",e)}),a.exports.fileSync=(b,c)=>a.exports.sync(d.readFileSync(b),c)},530:a=>{"use strict";let b=(a,b)=>function(...c){return new b.promiseModule((d,e)=>{b.multiArgs?c.push((...a)=>{b.errorFirst?a[0]?e(a):(a.shift(),d(a)):d(a)}):b.errorFirst?c.push((a,b)=>{a?e(a):d(b)}):c.push(d),a.apply(this,c)})};a.exports=(a,c)=>{let d;c=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},c);let e=typeof a;if(null===a||"object"!==e&&"function"!==e)throw TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===a?"null":e}\``);let f=a=>{let b=b=>"string"==typeof b?a===b:b.test(a);return c.include?c.include.some(b):!c.exclude.some(b)};for(let g in d="function"===e?function(...d){return c.excludeMain?a(...d):b(a,c).apply(this,d)}:Object.create(Object.getPrototypeOf(a)),a){let e=a[g];d[g]="function"==typeof e&&f(g)?b(e,c):e}return d}},147:a=>{"use strict";a.exports=c(9021)},781:a=>{"use strict";a.exports=c(7910)},796:a=>{"use strict";a.exports=c(4075)}},d={};function e(a){var c=d[a];if(void 0!==c)return c.exports;var f=d[a]={exports:{}},g=!0;try{b[a](f,f.exports,e),g=!1}finally{g&&delete d[a]}return f.exports}e.ab=__dirname+"/",a.exports=e(349)})()},8652:(a,b,c)=>{"use strict";function d(a,b){if(void 0===b&&(b={}),b.onlyHashChange)return void a();let c=document.documentElement;c.dataset.scrollBehavior;let d=c.style.scrollBehavior;c.style.scrollBehavior="auto",b.dontForceLayout||c.getClientRects(),a(),c.style.scrollBehavior=d}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return d}}),c(1025)},8900:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"escapeStringRegexp",{enumerable:!0,get:function(){return e}});let c=/[|\\{}()[\]^$+*?.-]/,d=/[|\\{}()[\]^$+*?.-]/g;function e(a){return c.test(a)?a.replace(d,"\\$&"):a}},8941:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"setAttributesFromProps",{enumerable:!0,get:function(){return f}});let c={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},d=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function e(a){return["async","defer","noModule"].includes(a)}function f(a,b){for(let[f,g]of Object.entries(b)){if(!b.hasOwnProperty(f)||d.includes(f)||void 0===g)continue;let h=c[f]||f.toLowerCase();"SCRIPT"===a.tagName&&e(h)?a[h]=!!g:a.setAttribute(h,String(g)),(!1===g||"SCRIPT"===a.tagName&&e(h)&&(!g||"false"===g))&&(a.setAttribute(h,""),a.removeAttribute(h))}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},9007:(a,b)=>{"use strict";function c(){return""}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return c}})},9320:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{createRouteLoader:function(){return q},getClientBuildManifest:function(){return o},isAssetError:function(){return k},markAssetError:function(){return j}}),c(7020),c(8333);let d=c(8542),e=c(4841),f=c(9007),g=c(5296);function h(a,b,c){let d,e=b.get(a);if(e)return"future"in e?e.future:Promise.resolve(e);let f=new Promise(a=>{d=a});return b.set(a,{resolve:d,future:f}),c?c().then(a=>(d(a),a)).catch(c=>{throw b.delete(a),c}):f}let i=Symbol("ASSET_LOAD_ERROR");function j(a){return Object.defineProperty(a,i,{})}function k(a){return a&&i in a}let l=function(a){try{return a=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||a.relList.supports("prefetch")}catch(a){return!1}}(),m=()=>(0,f.getDeploymentIdQueryOrEmptyString)();function n(a,b,c){return new Promise((d,f)=>{let g=!1;a.then(a=>{g=!0,d(a)}).catch(f),(0,e.requestIdleCallback)(()=>setTimeout(()=>{g||f(c)},b))})}function o(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):n(new Promise(a=>{let b=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{a(self.__BUILD_MANIFEST),b&&b()}}),3800,j(Object.defineProperty(Error("Failed to load client build manifest"),"__NEXT_ERROR_CODE",{value:"E273",enumerable:!1,configurable:!0})))}function p(a,b){return o().then(c=>{if(!(b in c))throw j(Object.defineProperty(Error("Failed to lookup route: "+b),"__NEXT_ERROR_CODE",{value:"E446",enumerable:!1,configurable:!0}));let e=c[b].map(b=>a+"/_next/"+(0,g.encodeURIPath)(b));return{scripts:e.filter(a=>a.endsWith(".js")).map(a=>(0,d.__unsafeCreateTrustedScriptURL)(a)+m()),css:e.filter(a=>a.endsWith(".css")).map(a=>a+m())}})}function q(a){let b=new Map,c=new Map,d=new Map,f=new Map;function g(a){{var b;let d=c.get(a.toString());return d?d:document.querySelector('script[src^="'+a+'"]')?Promise.resolve():(c.set(a.toString(),d=new Promise((c,d)=>{(b=document.createElement("script")).onload=c,b.onerror=()=>d(j(Object.defineProperty(Error("Failed to load script: "+a),"__NEXT_ERROR_CODE",{value:"E74",enumerable:!1,configurable:!0}))),b.crossOrigin=void 0,b.src=a,document.body.appendChild(b)})),d)}}function i(a){let b=d.get(a);return b||d.set(a,b=fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw Object.defineProperty(Error("Failed to load stylesheet: "+a),"__NEXT_ERROR_CODE",{value:"E189",enumerable:!1,configurable:!0});return b.text().then(b=>({href:a,content:b}))}).catch(a=>{throw j(a)})),b}return{whenEntrypoint:a=>h(a,b),onEntrypoint(a,c){(c?Promise.resolve().then(()=>c()).then(a=>({component:a&&a.default||a,exports:a}),a=>({error:a})):Promise.resolve(void 0)).then(c=>{let d=b.get(a);d&&"resolve"in d?c&&(b.set(a,c),d.resolve(c)):(c?b.set(a,c):b.delete(a),f.delete(a))})},loadRoute(c,d){return h(c,f,()=>{let e;return n(p(a,c).then(a=>{let{scripts:d,css:e}=a;return Promise.all([b.has(c)?[]:Promise.all(d.map(g)),Promise.all(e.map(i))])}).then(a=>this.whenEntrypoint(c).then(b=>({entrypoint:b,styles:a[1]}))),3800,j(Object.defineProperty(Error("Route did not complete loading: "+c),"__NEXT_ERROR_CODE",{value:"E12",enumerable:!1,configurable:!0}))).then(a=>{let{entrypoint:b,styles:c}=a,d=Object.assign({styles:c},b);return"error"in b?b:d}).catch(a=>{if(d)throw a;return{error:a}}).finally(()=>null==e?void 0:e())})},prefetch(b){let c;return(c=navigator.connection)&&(c.saveData||/2g/.test(c.effectiveType))?Promise.resolve():p(a,b).then(a=>Promise.all(l?a.scripts.map(a=>{var b,c,d;return b=a.toString(),c="script",new Promise((a,e)=>{let f='\n link[rel="prefetch"][href^="'+b+'"],\n link[rel="preload"][href^="'+b+'"],\n script[src^="'+b+'"]';if(document.querySelector(f))return a();d=document.createElement("link"),c&&(d.as=c),d.rel="prefetch",d.crossOrigin=void 0,d.onload=a,d.onerror=()=>e(j(Object.defineProperty(Error("Failed to prefetch: "+b),"__NEXT_ERROR_CODE",{value:"E268",enumerable:!1,configurable:!0}))),d.href=b,document.head.appendChild(d)})}):[])).then(()=>{(0,e.requestIdleCallback)(()=>this.loadRoute(b,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},9456:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(8732),e=c(2015),f=c(4670);let g=()=>{let{user:a}=(0,f.A)(),[b,c]=(0,e.useState)(null),[g,h]=(0,e.useState)(!0),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)("general"),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)({});(0,e.useEffect)(()=>{u()},[a]);let u=async()=>{if(a)try{let a=localStorage.getItem("tcg_vault_token"),b=await fetch("/api/user/preferences",{headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(b.ok){let a=await b.json();c(a.preferences)}else l({type:"error",text:"Failed to load preferences"})}catch(a){console.error("Error loading preferences:",a),l({type:"error",text:"Error loading preferences"})}finally{h(!1)}},v=async()=>{if(b){j(!0);try{let a=localStorage.getItem("tcg_vault_token"),d=await fetch("/api/user/preferences",{method:"PUT",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(b)}),e=await d.json();d.ok?(l({type:"success",text:"Settings saved successfully!"}),c(e.preferences)):l({type:"error",text:e.error||"Failed to save settings"})}catch(a){console.error("Error saving preferences:",a),l({type:"error",text:"Error saving settings"})}finally{j(!1)}}},w=async()=>{if(!b?.ocrSettings.openai_api_key)return void t(a=>({...a,openai:"❌ API key required"}));p(!0);try{let a=await fetch("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${b.ocrSettings.openai_api_key}`}});a.ok?t(a=>({...a,openai:"✅ API key valid"})):t(b=>({...b,openai:`❌ API error: ${a.status}`}))}catch(a){t(b=>({...b,openai:`❌ Connection failed: ${a.message}`}))}finally{p(!1)}},x=async()=>{if(b?.ocrSettings.ollama_url){r(!0);try{let a=await fetch(`${b.ocrSettings.ollama_url}/api/tags`);if(a.ok){let b=await a.json();b.models?.some(a=>a.name.includes("llava")||a.name.includes("vision"))?t(a=>({...a,ollama:"✅ Ollama with vision models available"})):t(a=>({...a,ollama:"⚠️ Ollama running but no vision models found"}))}else t(b=>({...b,ollama:`❌ Ollama error: ${a.status}`}))}catch(a){t(b=>({...b,ollama:`❌ Cannot reach Ollama: ${a.message}`}))}finally{r(!1)}}},y=(a,d)=>{b&&c({...b,[a]:d})},z=(a,d)=>{b&&c({...b,ocrSettings:{...b.ocrSettings,[a]:d}})};return g?(0,d.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,d.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600"})}):b?(0,d.jsxs)("div",{className:"max-w-4xl mx-auto p-6",children:[(0,d.jsxs)("div",{className:"mb-8",children:[(0,d.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Settings"}),(0,d.jsx)("p",{className:"text-gray-600",children:"Manage your account preferences and OCR configuration"})]}),k&&(0,d.jsx)("div",{className:`mb-6 p-4 rounded-lg ${"success"===k.type?"bg-green-50 text-green-800 border border-green-200":"bg-red-50 text-red-800 border border-red-200"}`,children:k.text}),(0,d.jsx)("div",{className:"border-b border-gray-200 mb-6",children:(0,d.jsx)("nav",{className:"-mb-px flex space-x-8",children:[{id:"general",label:"General",icon:"⚙️"},{id:"ocr",label:"AI OCR",icon:"\uD83E\uDD16"},{id:"privacy",label:"Privacy",icon:"\uD83D\uDD12"}].map(a=>(0,d.jsxs)("button",{onClick:()=>n(a.id),className:`py-2 px-1 border-b-2 font-medium text-sm ${m===a.id?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[(0,d.jsx)("span",{className:"mr-2",children:a.icon}),a.label]},a.id))})}),(0,d.jsxs)("div",{className:"space-y-6",children:["general"===m&&(0,d.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[(0,d.jsx)("h3",{className:"text-lg font-medium mb-4",children:"General Preferences"}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Default View"}),(0,d.jsxs)("select",{value:b.defaultView,onChange:a=>y("defaultView",a.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500",children:[(0,d.jsx)("option",{value:"card",children:"Card View"}),(0,d.jsx)("option",{value:"table",children:"Table View"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Items per Page"}),(0,d.jsxs)("select",{value:b.itemsPerPage,onChange:a=>y("itemsPerPage",parseInt(a.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500",children:[(0,d.jsx)("option",{value:10,children:"10"}),(0,d.jsx)("option",{value:20,children:"20"}),(0,d.jsx)("option",{value:50,children:"50"}),(0,d.jsx)("option",{value:100,children:"100"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Theme"}),(0,d.jsxs)("select",{value:b.theme,onChange:a=>y("theme",a.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500",children:[(0,d.jsx)("option",{value:"light",children:"Light"}),(0,d.jsx)("option",{value:"dark",children:"Dark"}),(0,d.jsx)("option",{value:"system",children:"System"})]})]}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"checkbox",checked:b.enableAnimations,onChange:a=>y("enableAnimations",a.target.checked),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,d.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Enable animations"})]}),(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"checkbox",checked:b.enableOcr,onChange:a=>y("enableOcr",a.target.checked),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,d.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Enable OCR scanning"})]})]})]})]}),"ocr"===m&&(0,d.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[(0,d.jsx)("h3",{className:"text-lg font-medium mb-4",children:"AI OCR Configuration"}),(0,d.jsxs)("div",{className:"mb-6",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-3",children:"Preferred OCR Service"}),(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"radio",value:"openai",checked:"openai"===b.ocrSettings.preferred_service,onChange:a=>z("preferred_service",a.target.value),className:"text-indigo-600 focus:ring-indigo-500"}),(0,d.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"OpenAI Vision API (Recommended)"})]}),(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"radio",value:"ollama",checked:"ollama"===b.ocrSettings.preferred_service,onChange:a=>z("preferred_service",a.target.value),className:"text-indigo-600 focus:ring-indigo-500"}),(0,d.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Ollama (Local/Private)"})]})]})]}),(0,d.jsxs)("div",{className:"border rounded-lg p-4 mb-6",children:[(0,d.jsx)("h4",{className:"font-medium text-gray-900 mb-3",children:"OpenAI Configuration"}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"API Key"}),(0,d.jsx)("input",{type:"password",value:b.ocrSettings.openai_api_key,onChange:a=>z("openai_api_key",a.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"}),(0,d.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["Get your API key from"," ",(0,d.jsx)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-indigo-600 hover:underline",children:"OpenAI Platform"})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("button",{onClick:w,disabled:o||!b.ocrSettings.openai_api_key,className:"bg-blue-600 text-white px-3 py-1 rounded text-sm disabled:bg-gray-400 hover:bg-blue-700",children:o?"Testing...":"Test API Key"}),s.openai&&(0,d.jsx)("span",{className:"text-sm",children:s.openai})]})]})]}),(0,d.jsxs)("div",{className:"border rounded-lg p-4 mb-6",children:[(0,d.jsx)("h4",{className:"font-medium text-gray-900 mb-3",children:"Ollama Configuration"}),(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Ollama URL"}),(0,d.jsx)("input",{type:"text",value:b.ocrSettings.ollama_url,onChange:a=>z("ollama_url",a.target.value),placeholder:"http://localhost:11434",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"}),(0,d.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["Requires LLaVA or similar vision model:"," ",(0,d.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"ollama pull llava"})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("button",{onClick:x,disabled:q,className:"bg-green-600 text-white px-3 py-1 rounded text-sm disabled:bg-gray-400 hover:bg-green-700",children:q?"Testing...":"Test Ollama"}),s.ollama&&(0,d.jsx)("span",{className:"text-sm",children:s.ollama})]})]})]}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Confidence Threshold (",b.ocrSettings.confidence_threshold,"%)"]}),(0,d.jsx)("input",{type:"range",min:"0",max:"100",value:b.ocrSettings.confidence_threshold,onChange:a=>z("confidence_threshold",parseInt(a.target.value)),className:"w-full"}),(0,d.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Minimum confidence required to accept OCR results"})]}),(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"checkbox",checked:b.ocrSettings.auto_add_to_collection,onChange:a=>z("auto_add_to_collection",a.target.checked),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,d.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Automatically add scanned cards to selected collection"})]})]})]}),"privacy"===m&&(0,d.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[(0,d.jsx)("h3",{className:"text-lg font-medium mb-4",children:"Privacy Settings"}),(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"checkbox",checked:b.privacySettings.collections_public,onChange:a=>y("privacySettings",{...b.privacySettings,collections_public:a.target.checked}),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,d.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Make collections public by default"})]}),(0,d.jsxs)("label",{className:"flex items-center",children:[(0,d.jsx)("input",{type:"checkbox",checked:b.privacySettings.decks_public,onChange:a=>y("privacySettings",{...b.privacySettings,decks_public:a.target.checked}),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,d.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Make decks public by default"})]})]})]})]}),(0,d.jsx)("div",{className:"mt-8 flex justify-end",children:(0,d.jsxs)("button",{onClick:v,disabled:i,className:"bg-indigo-600 text-white px-6 py-2 rounded-lg hover:bg-indigo-700 disabled:bg-gray-400 flex items-center gap-2",children:[i&&(0,d.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),i?"Saving...":"Save Settings"]})})]}):(0,d.jsxs)("div",{className:"text-center py-8",children:[(0,d.jsx)("p",{className:"text-red-600",children:"Failed to load preferences"}),(0,d.jsx)("button",{onClick:u,className:"mt-4 text-indigo-600 hover:underline",children:"Try Again"})]})}},9582:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A:()=>j});var e=c(8732),f=c(2015),g=c(8462),h=c(6659),i=a([g,h]);[g,h]=i.then?(await i)():i;let j=({isOpen:a,onClose:b,deckId:c})=>{let d=(0,g.useQueryClient)(),[i,j]=(0,f.useState)({name:"",description:"",game:"MTG",format:"",tags:[],color:"#8b5cf6",isPublic:!1}),[k,l]=(0,f.useState)([]),{data:m}=(0,g.useQuery)({queryKey:["deck",c],queryFn:()=>h.LO.decks.getDeck(c),enabled:!!c}),{data:n=[]}=(0,g.useQuery)({queryKey:["tags"],queryFn:()=>h.LO.tags.getTags()}),o=(0,g.useMutation)({mutationFn:h.LO.decks.createDeck,onSuccess:()=>{d.invalidateQueries({queryKey:["decks"]}),b()}}),p=(0,g.useMutation)({mutationFn:({id:a,data:b})=>h.LO.decks.updateDeck(a,b),onSuccess:()=>{d.invalidateQueries({queryKey:["decks"]}),d.invalidateQueries({queryKey:["deck",c]}),b()}});(0,f.useEffect)(()=>{m&&(j({name:m.name,description:m.description||"",game:m.game,format:m.format||"",tags:m.tags,color:m.color||"#8b5cf6",isPublic:m.isPublic}),l(m.tags))},[m]);let q=async a=>{a.preventDefault();let b={...i,tags:k};c&&m?p.mutate({id:c,data:b}):o.mutate(b)};return a?(0,e.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:b,children:(0,e.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl max-h-[90vh] overflow-hidden animate-slide-up",children:(0,e.jsxs)("div",{className:"p-6",children:[(0,e.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,e.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,e.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:c?"Edit Deck":"New Deck"}),(0,e.jsx)("button",{onClick:b,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,e.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,e.jsx)("div",{className:"max-h-[calc(90vh-8rem)] overflow-y-auto",children:(0,e.jsxs)("form",{onSubmit:q,className:"space-y-6",onClick:a=>a.stopPropagation(),children:[(0,e.jsx)("div",{className:"p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:(0,e.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:i.color},children:"\uD83C\uDFB4"}),(0,e.jsxs)("div",{className:"flex-1",children:[(0,e.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:i.name||"Deck Name"}),i.description&&(0,e.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:i.description}),(0,e.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[(0,e.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(a=>{switch(a){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(i.game)}`,children:i.game}),i.format&&(0,e.jsx)("span",{className:"px-2 py-1 bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 rounded-full text-xs font-medium",children:i.format})]})]})]})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Deck Name *"}),(0,e.jsx)("input",{type:"text",value:i.name,onChange:a=>j(b=>({...b,name:a.target.value})),placeholder:"Enter deck name...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",required:!0})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Description"}),(0,e.jsx)("textarea",{value:i.description,onChange:a=>j(b=>({...b,description:a.target.value})),rows:3,placeholder:"Describe your deck...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors resize-none"})]}),(0,e.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Game *"}),(0,e.jsxs)("select",{value:i.game,onChange:a=>j(b=>({...b,game:a.target.value,format:""})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,e.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,e.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,e.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,e.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Format"}),(0,e.jsxs)("select",{value:i.format,onChange:a=>j(b=>({...b,format:a.target.value})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,e.jsx)("option",{value:"",children:"Select Format"}),(a=>{switch(a){case"MTG":return[{value:"standard",label:"Standard"},{value:"modern",label:"Modern"},{value:"commander",label:"Commander"},{value:"pioneer",label:"Pioneer"},{value:"legacy",label:"Legacy"},{value:"vintage",label:"Vintage"},{value:"draft",label:"Draft"},{value:"sealed",label:"Sealed"}];case"POKEMON":return[{value:"standard",label:"Standard"},{value:"expanded",label:"Expanded"},{value:"unlimited",label:"Unlimited"}];case"LORCANA":return[{value:"standard",label:"Standard"},{value:"constructed",label:"Constructed"}];case"YUGIOH":return[{value:"advanced",label:"Advanced"},{value:"traditional",label:"Traditional"}];default:return[]}})(i.game).map(a=>(0,e.jsx)("option",{value:a.value,children:a.label},a.value))]})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Color"}),(0,e.jsx)("div",{className:"grid grid-cols-5 gap-2",children:["#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#ec4899","#6366f1","#06b6d4","#84cc16","#f97316"].map(a=>(0,e.jsx)("button",{type:"button",onClick:()=>j(b=>({...b,color:a})),className:`w-full h-12 rounded-lg transition-all ${i.color===a?"ring-2 ring-surface-400 ring-offset-2 dark:ring-offset-surface-900":""}`,style:{backgroundColor:a}},a))})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Tags"}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(a=>(0,e.jsx)("button",{type:"button",onClick:()=>{l(b=>b.includes(a.id)?b.filter(b=>b!==a.id):[...b,a.id])},className:`px-3 py-2 rounded-full text-sm font-medium transition-colors ${k.includes(a.id)?"text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,style:{backgroundColor:k.includes(a.id)?a.color:void 0},children:a.name},a.id))})]}),(0,e.jsx)("div",{children:(0,e.jsxs)("label",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("span",{className:"text-sm font-medium text-surface-700 dark:text-surface-300",children:"Public Deck"}),(0,e.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 mt-1",children:"Allow others to view your deck"})]}),(0,e.jsx)("button",{type:"button",onClick:()=>j(a=>({...a,isPublic:!a.isPublic})),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 ${i.isPublic?"bg-primary-600":"bg-surface-200 dark:bg-surface-700"}`,children:(0,e.jsx)("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${i.isPublic?"translate-x-5":"translate-x-0"}`})})]})}),c&&m&&(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mb-4",children:(0,e.jsxs)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white",children:["Deck Cards (",m.mainboard?.length||0,")"]})}),(0,e.jsx)("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:m.mainboard?.map((a,b)=>(0,e.jsxs)("div",{className:"flex items-center justify-between p-3 bg-surface-50 dark:bg-surface-700 rounded-lg",children:[(0,e.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,e.jsxs)("span",{className:"text-sm font-medium text-surface-900 dark:text-white",children:[a.quantity,"x"]}),(0,e.jsx)("span",{className:"text-sm text-surface-700 dark:text-surface-300",children:a.card?.name||"Unknown Card"})]}),(0,e.jsx)("button",{type:"button",onClick:()=>{},className:"p-1 text-red-400 hover:text-red-600 rounded transition-colors",children:(0,e.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},b))})]}),(0,e.jsx)("button",{type:"submit",disabled:!i.name.trim()||o.isPending||p.isPending,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:o.isPending||p.isPending?(0,e.jsxs)("div",{className:"flex items-center justify-center",children:[(0,e.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,e.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,e.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),c?"Updating...":"Creating..."]}):c?"Update Deck":"Create Deck"})]})})]})})}):null};d()}catch(a){d(a)}})}}; \ No newline at end of file diff --git a/.next/server/dynamic-css-manifest.js b/.next/server/dynamic-css-manifest.js new file mode 100644 index 0000000..8df9f6b --- /dev/null +++ b/.next/server/dynamic-css-manifest.js @@ -0,0 +1 @@ +self.__DYNAMIC_CSS_MANIFEST="[]"; \ No newline at end of file diff --git a/.next/server/functions-config-manifest.json b/.next/server/functions-config-manifest.json new file mode 100644 index 0000000..e685b82 --- /dev/null +++ b/.next/server/functions-config-manifest.json @@ -0,0 +1,4 @@ +{ + "version": 1, + "functions": {} +} \ No newline at end of file diff --git a/.next/server/interception-route-rewrite-manifest.js b/.next/server/interception-route-rewrite-manifest.js new file mode 100644 index 0000000..24f77ba --- /dev/null +++ b/.next/server/interception-route-rewrite-manifest.js @@ -0,0 +1 @@ +self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST="[]"; \ No newline at end of file diff --git a/.next/server/middleware-build-manifest.js b/.next/server/middleware-build-manifest.js new file mode 100644 index 0000000..e3fbc5d --- /dev/null +++ b/.next/server/middleware-build-manifest.js @@ -0,0 +1 @@ +globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:[],rootMainFilesTree:{},pages:{"/":["static/chunks/webpack-2514287f28c61aa9.js","static/chunks/framework-f75312fc4004b783.js","static/chunks/main-b0584c0399485cea.js","static/chunks/pages/index-a7c47e3ce924016f.js"],"/_app":["static/chunks/webpack-2514287f28c61aa9.js","static/chunks/framework-f75312fc4004b783.js","static/chunks/main-b0584c0399485cea.js","static/css/fd61543791679090.css","static/chunks/pages/_app-d59881a6b717b660.js"],"/_error":["static/chunks/webpack-2514287f28c61aa9.js","static/chunks/framework-f75312fc4004b783.js","static/chunks/main-b0584c0399485cea.js","static/chunks/pages/_error-e15c84159987e7e6.js"]},ampFirstPages:[]},globalThis.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"]; \ No newline at end of file diff --git a/.next/server/middleware-manifest.json b/.next/server/middleware-manifest.json new file mode 100644 index 0000000..33872a3 --- /dev/null +++ b/.next/server/middleware-manifest.json @@ -0,0 +1,6 @@ +{ + "version": 3, + "middleware": {}, + "functions": {}, + "sortedMiddleware": [] +} \ No newline at end of file diff --git a/.next/server/middleware-react-loadable-manifest.js b/.next/server/middleware-react-loadable-manifest.js new file mode 100644 index 0000000..69bc9ae --- /dev/null +++ b/.next/server/middleware-react-loadable-manifest.js @@ -0,0 +1 @@ +self.__REACT_LOADABLE_MANIFEST='{"pages/index.tsx -> ../src/App":{"id":9639,"files":["static/chunks/5330eab6.0e905b95dc8a5a19.js","static/chunks/469.31893841137c9659.js","static/chunks/639.879f3c63a68ab0ec.js"]}}'; \ No newline at end of file diff --git a/.next/server/next-font-manifest.js b/.next/server/next-font-manifest.js new file mode 100644 index 0000000..8267a50 --- /dev/null +++ b/.next/server/next-font-manifest.js @@ -0,0 +1 @@ +self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false}'; \ No newline at end of file diff --git a/.next/server/next-font-manifest.json b/.next/server/next-font-manifest.json new file mode 100644 index 0000000..25f78e7 --- /dev/null +++ b/.next/server/next-font-manifest.json @@ -0,0 +1 @@ +{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false} \ No newline at end of file diff --git a/.next/server/pages-manifest.json b/.next/server/pages-manifest.json new file mode 100644 index 0000000..7a94dde --- /dev/null +++ b/.next/server/pages-manifest.json @@ -0,0 +1,7 @@ +{ + "/": "pages/index.html", + "/_app": "pages/_app.js", + "/_error": "pages/_error.js", + "/_document": "pages/_document.js", + "/404": "pages/404.html" +} \ No newline at end of file diff --git a/.next/server/pages/404.html b/.next/server/pages/404.html new file mode 100644 index 0000000..b0a8b95 --- /dev/null +++ b/.next/server/pages/404.html @@ -0,0 +1 @@ +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/.next/server/pages/500.html b/.next/server/pages/500.html new file mode 100644 index 0000000..713d195 --- /dev/null +++ b/.next/server/pages/500.html @@ -0,0 +1 @@ +500: Internal Server Error

500

Internal Server Error.

\ No newline at end of file diff --git a/.next/server/pages/_app.js b/.next/server/pages/_app.js new file mode 100644 index 0000000..59ebb13 --- /dev/null +++ b/.next/server/pages/_app.js @@ -0,0 +1 @@ +(()=>{var a={};a.id=636,a.ids=[636],a.modules={2015:a=>{"use strict";a.exports=require("react")},2386:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>i});var e=c(8732);c(2015);var f=c(8462),g=c(4670);c(8754);var h=a([f]);let j=new(f=(h.then?(await h)():h)[0]).QueryClient({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function i({Component:a,pageProps:b}){return(0,e.jsx)(f.QueryClientProvider,{client:j,children:(0,e.jsx)(g.O,{children:(0,e.jsx)(a,{...b})})})}d()}catch(a){d(a)}})},4670:(a,b,c)=>{"use strict";c.d(b,{A:()=>g,O:()=>h});var d=c(8732),e=c(2015);let f=(0,e.createContext)(void 0),g=()=>{let a=(0,e.useContext)(f);if(void 0===a)throw Error("useAuth must be used within an AuthProvider");return a},h=({children:a})=>{let[b,c]=(0,e.useState)(null),[g,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!0);(0,e.useEffect)(()=>{let a=localStorage.getItem("tcg_vault_token"),b=localStorage.getItem("tcg_vault_user");if(a&&b)try{let d=JSON.parse(b);h(a),c(d)}catch(a){console.error("Error parsing saved user data:",a),localStorage.removeItem("tcg_vault_token"),localStorage.removeItem("tcg_vault_user")}j(!1)},[]);let k=async(a,b)=>{try{let d=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a,password:b})}),e=await d.json();if(e.success)return c(e.user),h(e.token),localStorage.setItem("tcg_vault_token",e.token),localStorage.setItem("tcg_vault_user",JSON.stringify(e.user)),{success:!0};return{success:!1,error:e.error||"Login failed"}}catch(a){return console.error("Login error:",a),{success:!1,error:"Network error. Please try again."}}},l=async a=>{try{let b=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),d=await b.json();if(d.success)return c(d.user),h(d.token),localStorage.setItem("tcg_vault_token",d.token),localStorage.setItem("tcg_vault_user",JSON.stringify(d.user)),{success:!0};return{success:!1,error:d.error||"Registration failed"}}catch(a){return console.error("Registration error:",a),{success:!1,error:"Network error. Please try again."}}},m=a=>b?.roles?.includes(a)||!1;return(0,d.jsx)(f.Provider,{value:{user:b,token:g,login:k,register:l,logout:()=>{c(null),h(null),localStorage.removeItem("tcg_vault_token"),localStorage.removeItem("tcg_vault_user")},isLoading:i,hasRole:m,hasPermission:a=>b?.permissions?.includes(a)||!1,isAdmin:()=>m("admin")},children:a})}},8462:a=>{"use strict";a.exports=import("@tanstack/react-query")},8732:a=>{"use strict";a.exports=require("react/jsx-runtime")},8754:()=>{}};var b=require("../webpack-runtime.js");b.C(a);var c=b(b.s=2386);module.exports=c})(); \ No newline at end of file diff --git a/.next/server/pages/_app.js.nft.json b/.next/server/pages/_app.js.nft.json new file mode 100644 index 0000000..3c46567 --- /dev/null +++ b/.next/server/pages/_app.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../../../node_modules/@tanstack/query-core/build/legacy/focusManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/hydration.cjs","../../../node_modules/@tanstack/query-core/build/legacy/index.cjs","../../../node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.cjs","../../../node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutation.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutationCache.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/onlineManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queriesObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/query.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryCache.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryClient.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/removable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/retryer.cjs","../../../node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs","../../../node_modules/@tanstack/query-core/build/legacy/subscribable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/thenable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/types.cjs","../../../node_modules/@tanstack/query-core/build/legacy/utils.cjs","../../../node_modules/@tanstack/query-core/build/modern/focusManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../node_modules/@tanstack/query-core/build/modern/hydration.cjs","../../../node_modules/@tanstack/query-core/build/modern/hydration.js","../../../node_modules/@tanstack/query-core/build/modern/index.cjs","../../../node_modules/@tanstack/query-core/build/modern/index.js","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js","../../../node_modules/@tanstack/query-core/build/modern/mutation.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutation.js","../../../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../node_modules/@tanstack/query-core/build/modern/query.cjs","../../../node_modules/@tanstack/query-core/build/modern/query.js","../../../node_modules/@tanstack/query-core/build/modern/queryCache.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../node_modules/@tanstack/query-core/build/modern/queryClient.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../node_modules/@tanstack/query-core/build/modern/removable.cjs","../../../node_modules/@tanstack/query-core/build/modern/removable.js","../../../node_modules/@tanstack/query-core/build/modern/retryer.cjs","../../../node_modules/@tanstack/query-core/build/modern/retryer.js","../../../node_modules/@tanstack/query-core/build/modern/streamedQuery.cjs","../../../node_modules/@tanstack/query-core/build/modern/streamedQuery.js","../../../node_modules/@tanstack/query-core/build/modern/subscribable.cjs","../../../node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../node_modules/@tanstack/query-core/build/modern/thenable.cjs","../../../node_modules/@tanstack/query-core/build/modern/thenable.js","../../../node_modules/@tanstack/query-core/build/modern/types.cjs","../../../node_modules/@tanstack/query-core/build/modern/types.js","../../../node_modules/@tanstack/query-core/build/modern/utils.cjs","../../../node_modules/@tanstack/query-core/build/modern/utils.js","../../../node_modules/@tanstack/query-core/package.json","../../../node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs","../../../node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs","../../../node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs","../../../node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs","../../../node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs","../../../node_modules/@tanstack/react-query/build/legacy/index.cjs","../../../node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/suspense.cjs","../../../node_modules/@tanstack/react-query/build/legacy/types.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useMutation.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useMutationState.cjs","../../../node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useQueries.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.cjs","../../../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js","../../../node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","../../../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../node_modules/@tanstack/react-query/build/modern/index.js","../../../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js","../../../node_modules/@tanstack/react-query/build/modern/mutationOptions.js","../../../node_modules/@tanstack/react-query/build/modern/queryOptions.js","../../../node_modules/@tanstack/react-query/build/modern/suspense.js","../../../node_modules/@tanstack/react-query/build/modern/types.js","../../../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useIsFetching.js","../../../node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../node_modules/@tanstack/react-query/build/modern/useMutationState.js","../../../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js","../../../node_modules/@tanstack/react-query/package.json","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../package.json","../../../pages/_app.tsx","../../package.json","../webpack-runtime.js"]} \ No newline at end of file diff --git a/.next/server/pages/_document.js b/.next/server/pages/_document.js new file mode 100644 index 0000000..5bdffa3 --- /dev/null +++ b/.next/server/pages/_document.js @@ -0,0 +1 @@ +"use strict";(()=>{var a={};a.id=220,a.ids=[220],a.modules={361:a=>{a.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},2015:a=>{a.exports=require("react")},3873:a=>{a.exports=require("path")},8732:a=>{a.exports=require("react/jsx-runtime")}};var b=require("../webpack-runtime.js");b.C(a);var c=b.X(0,[616],()=>b(b.s=9616));module.exports=c})(); \ No newline at end of file diff --git a/.next/server/pages/_document.js.nft.json b/.next/server/pages/_document.js.nft.json new file mode 100644 index 0000000..8f8e2fe --- /dev/null +++ b/.next/server/pages/_document.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/client/components/app-router-headers.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/constants.js","../../../node_modules/next/dist/lib/interop-default.js","../../../node_modules/next/dist/lib/is-error.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/pages/_document.js","../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../node_modules/next/dist/server/lib/lru-cache.js","../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/server/load-manifest.external.js","../../../node_modules/next/dist/server/response-cache/types.js","../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../package.json","../../package.json","../chunks/616.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/.next/server/pages/_error.js b/.next/server/pages/_error.js new file mode 100644 index 0000000..970f889 --- /dev/null +++ b/.next/server/pages/_error.js @@ -0,0 +1 @@ +(()=>{var a={};a.id=731,a.ids=[220,636,731],a.modules={156:a=>{"use strict";a.exports=require("next/dist/shared/lib/utils")},361:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},609:(a,b)=>{"use strict";function c(a){let{ampFirst:b=!1,hybrid:c=!1,hasQuery:d=!1}=void 0===a?{}:a;return b||c&&d}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isInAmpMode",{enumerable:!0,get:function(){return c}})},1025:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"warnOnce",{enumerable:!0,get:function(){return c}});let c=a=>{}},1145:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),!function(a,b){for(var c in b)Object.defineProperty(a,c,{enumerable:!0,get:b[c]})}(b,{default:function(){return p},defaultHead:function(){return l}});let d=c(7020),e=c(3147),f=c(8732),g=e._(c(2015)),h=d._(c(8160)),i=c(7043),j=c(1523),k=c(609);function l(a){void 0===a&&(a=!1);let b=[(0,f.jsx)("meta",{charSet:"utf-8"},"charset")];return a||b.push((0,f.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),b}function m(a,b){return"string"==typeof b||"number"==typeof b?a:b.type===g.default.Fragment?a.concat(g.default.Children.toArray(b.props.children).reduce((a,b)=>"string"==typeof b||"number"==typeof b?a:a.concat(b),[])):a.concat(b)}c(1025);let n=["name","httpEquiv","charSet","itemProp"];function o(a,b){let{inAmpMode:c}=b;return a.reduce(m,[]).reverse().concat(l(c).reverse()).filter(function(){let a=new Set,b=new Set,c=new Set,d={};return e=>{let f=!0,g=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){g=!0;let b=e.key.slice(e.key.indexOf("$")+1);a.has(b)?f=!1:a.add(b)}switch(e.type){case"title":case"base":b.has(e.type)?f=!1:b.add(e.type);break;case"meta":for(let a=0,b=n.length;a{let c=a.key||b;return g.default.cloneElement(a,{key:c})})}let p=function(a){let{children:b}=a,c=(0,g.useContext)(i.AmpStateContext),d=(0,g.useContext)(j.HeadManagerContext);return(0,f.jsx)(h.default,{reduceComponentsToState:o,headManager:d,inAmpMode:(0,k.isInAmpMode)(c),children:b})};("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},1322:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/format-url")},1523:(a,b,c)=>{"use strict";a.exports=c(3885).vendored.contexts.HeadManagerContext},2015:a=>{"use strict";a.exports=require("react")},2386:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{default:()=>i});var e=c(8732);c(2015);var f=c(8462),g=c(4670);c(8754);var h=a([f]);let j=new(f=(h.then?(await h)():h)[0]).QueryClient({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function i({Component:a,pageProps:b}){return(0,e.jsx)(f.QueryClientProvider,{client:j,children:(0,e.jsx)(g.O,{children:(0,e.jsx)(a,{...b})})})}d()}catch(a){d(a)}})},3103:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/add-path-prefix")},3147:(a,b)=>{"use strict";function c(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,d=new WeakMap;return(c=function(a){return a?d:b})(a)}b._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var d=c(b);if(d&&d.has(a))return d.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,d&&d.set(a,e),e}},3873:a=>{"use strict";a.exports=require("path")},4670:(a,b,c)=>{"use strict";c.d(b,{A:()=>g,O:()=>h});var d=c(8732),e=c(2015);let f=(0,e.createContext)(void 0),g=()=>{let a=(0,e.useContext)(f);if(void 0===a)throw Error("useAuth must be used within an AuthProvider");return a},h=({children:a})=>{let[b,c]=(0,e.useState)(null),[g,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!0);(0,e.useEffect)(()=>{let a=localStorage.getItem("tcg_vault_token"),b=localStorage.getItem("tcg_vault_user");if(a&&b)try{let d=JSON.parse(b);h(a),c(d)}catch(a){console.error("Error parsing saved user data:",a),localStorage.removeItem("tcg_vault_token"),localStorage.removeItem("tcg_vault_user")}j(!1)},[]);let k=async(a,b)=>{try{let d=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a,password:b})}),e=await d.json();if(e.success)return c(e.user),h(e.token),localStorage.setItem("tcg_vault_token",e.token),localStorage.setItem("tcg_vault_user",JSON.stringify(e.user)),{success:!0};return{success:!1,error:e.error||"Login failed"}}catch(a){return console.error("Login error:",a),{success:!1,error:"Network error. Please try again."}}},l=async a=>{try{let b=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),d=await b.json();if(d.success)return c(d.user),h(d.token),localStorage.setItem("tcg_vault_token",d.token),localStorage.setItem("tcg_vault_user",JSON.stringify(d.user)),{success:!0};return{success:!1,error:d.error||"Registration failed"}}catch(a){return console.error("Registration error:",a),{success:!1,error:"Network error. Please try again."}}},m=a=>b?.roles?.includes(a)||!1;return(0,d.jsx)(f.Provider,{value:{user:b,token:g,login:k,register:l,logout:()=>{c(null),h(null),localStorage.removeItem("tcg_vault_token"),localStorage.removeItem("tcg_vault_user")},isLoading:i,hasRole:m,hasPermission:a=>b?.permissions?.includes(a)||!1,isAdmin:()=>m("admin")},children:a})}},5379:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return k}});let d=c(7020),e=c(8732),f=d._(c(2015)),g=d._(c(1145)),h={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function i(a){let b,{req:d,res:e,err:f}=a,g=e&&e.statusCode?e.statusCode:f?f.statusCode:404;if(d){let{getRequestMeta:a}=c(5124),e=a(d,"initURL");e&&(b=new URL(e).hostname)}return{statusCode:g,hostname:b}}let j={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class k extends f.default.Component{render(){let{statusCode:a,withDarkMode:b=!0}=this.props,c=this.props.title||h[a]||"An unexpected error has occurred";return(0,e.jsxs)("div",{style:j.error,children:[(0,e.jsx)(g.default,{children:(0,e.jsx)("title",{children:a?a+": "+c:"Application error: a client-side exception has occurred"})}),(0,e.jsxs)("div",{style:j.desc,children:[(0,e.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(b?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),a?(0,e.jsx)("h1",{className:"next-error-h1",style:j.h1,children:a}):null,(0,e.jsx)("div",{style:j.wrap,children:(0,e.jsxs)("h2",{style:j.h2,children:[this.props.title||a?c:(0,e.jsxs)(e.Fragment,{children:["Application error: a client-side exception has occurred"," ",!!this.props.hostname&&(0,e.jsxs)(e.Fragment,{children:["while loading ",this.props.hostname]})," ","(see the browser console for more information)"]}),"."]})})]})]})}}k.displayName="ErrorPage",k.getInitialProps=i,k.origGetInitialProps=i,("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},5952:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/remove-trailing-slash")},6439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},6713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},7043:(a,b,c)=>{"use strict";a.exports=c(3885).vendored.contexts.AmpContext},7909:a=>{"use strict";a.exports=require("next/dist/shared/lib/page-path/normalize-data-path")},8160:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}});let d=c(2015),e=()=>{};function f(a){var b;let{headManager:c,reduceComponentsToState:f}=a;function g(){if(c&&c.mountedInstances){let b=d.Children.toArray(Array.from(c.mountedInstances).filter(Boolean));c.updateHead(f(b,a))}}return null==c||null==(b=c.mountedInstances)||b.add(a.children),g(),e(()=>{var b;return null==c||null==(b=c.mountedInstances)||b.add(a.children),()=>{var b;null==c||null==(b=c.mountedInstances)||b.delete(a.children)}}),e(()=>(c&&(c._pendingUpdate=g),()=>{c&&(c._pendingUpdate=g)})),null}},8462:a=>{"use strict";a.exports=import("@tanstack/react-query")},8732:a=>{"use strict";a.exports=require("react/jsx-runtime")},8754:()=>{},9875:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{config:()=>M,default:()=>I,getServerSideProps:()=>L,getStaticPaths:()=>K,getStaticProps:()=>J,handler:()=>H,reportWebVitals:()=>N,routeModule:()=>T,unstable_getServerProps:()=>R,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>Q,unstable_getStaticPaths:()=>P,unstable_getStaticProps:()=>O});var e=c(3885),f=c(237),g=c(772),h=c(2410),i=c(1322),j=c(5124),k=c(8647),l=c(3709),m=c(7909),n=c(5122),o=c(1413),p=c(9616),q=c.n(p),r=c(2386),s=c(5379),t=c.n(s),u=c(6755),v=c(156),w=c(12),x=c(2072),y=c(8164),z=c(4971),A=c(8737),B=c(6439),C=c(5735),D=c(6713),E=c(3103),F=c(5952),G=a([r]);r=(G.then?(await G)():G)[0];let I=(0,o.M)(s,"default"),J=(0,o.M)(s,"getStaticProps"),K=(0,o.M)(s,"getStaticPaths"),L=(0,o.M)(s,"getServerSideProps"),M=(0,o.M)(s,"config"),N=(0,o.M)(s,"reportWebVitals"),O=(0,o.M)(s,"unstable_getStaticProps"),P=(0,o.M)(s,"unstable_getStaticPaths"),Q=(0,o.M)(s,"unstable_getStaticParams"),R=(0,o.M)(s,"unstable_getServerProps"),S=(0,o.M)(s,"unstable_getServerSideProps"),T=new e.PagesRouteModule({definition:{kind:f.RouteKind.PAGES,page:"/_error",pathname:"/_error",bundlePath:"",filename:""},distDir:".next",projectDir:"",components:{App:r.default,Document:q()},userland:s});async function H(a,b,c){var d,e;let o="/_error";"/index"===o&&(o="/");let p="false",q=await T.prepare(a,b,{srcPage:o,multiZoneDraftMode:p});if(!q){b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve());return}let{buildId:r,query:G,params:H,parsedUrl:I,originalQuery:N,originalPathname:O,buildManifest:P,nextFontManifest:Q,serverFilesManifest:R,reactLoadableManifest:S,prerenderManifest:U,isDraftMode:V,isOnDemandRevalidate:W,revalidateOnlyGenerated:X,locale:Y,locales:Z,defaultLocale:$,routerServerContext:_,nextConfig:aa,resolvedPathname:ab}=q,ac=null==R||null==(e=R.config)||null==(d=e.experimental)?void 0:d.isExperimentalCompile,ad=!!L,ae=!!J,af=!!K,ag=!!(t()||s).getInitialProps,ah=G.amp&&M.amp,ai=null,aj=!1,ak=q.isNextDataRequest&&(ae||ad),al="/404"===o,am="/500"===o,an="/_error"===o;if(T.isDev||V||!ae||(ai=`${Y?`/${Y}`:""}${("/"===o||"/"===ab)&&Y?"":ab}${ah?".amp":""}`,(al||am||an)&&(ai=`${Y?`/${Y}`:""}${o}${ah?".amp":""}`),ai="/index"===ai?"/":ai),af&&!V){let a=(0,F.removeTrailingSlash)(Y?(0,E.addPathPrefix)(ab,`/${Y}`):ab),b=!!U.routes[a]||U.notFoundRoutes.includes(a),c=U.dynamicRoutes[o];if(c){if(!1===c.fallback&&!b)throw new B.NoFallbackError;"string"!=typeof c.fallback||b||ak||(aj=!0)}}(aj&&(0,D.isBot)(a.headers["user-agent"]||"")||(0,j.getRequestMeta)(a,"minimalMode"))&&(aj=!1);let ao=(0,h.getTracer)(),ap=ao.getActiveScopeSpan();try{let d=a.method||"GET",e=(0,i.formatUrl)({pathname:aa.trailingSlash?I.pathname:(0,F.removeTrailingSlash)(I.pathname||"/"),query:ae?{}:N}),q=(null==_?void 0:_.publicRuntimeConfig)||aa.publicRuntimeConfig,t=async h=>{var t,B;let D,E=async({previousCacheEntry:t})=>{var u;let v=async()=>{try{var c,f,u;return await T.render(a,b,{query:ae&&!ac?{...H,...ah?{amp:G.amp}:{}}:{...G,...H},params:H,page:o,renderContext:{isDraftMode:V,isFallback:aj,developmentNotFoundSourcePage:(0,j.getRequestMeta)(a,"developmentNotFoundSourcePage")},sharedContext:{buildId:r,customServer:!!(null==_?void 0:_.isCustomServer)||void 0,deploymentId:!1},renderOpts:{params:H,routeModule:T,page:o,pageConfig:M||{},Component:(0,k.T)(s),ComponentMod:s,getStaticProps:J,getStaticPaths:K,getServerSideProps:L,supportsDynamicResponse:!ae,buildManifest:P,nextFontManifest:Q,reactLoadableManifest:S,assetPrefix:aa.assetPrefix,strictNextHead:aa.experimental.strictNextHead??!0,previewProps:U.preview,images:aa.images,nextConfigOutput:aa.output,optimizeCss:!!aa.experimental.optimizeCss,nextScriptWorkers:!!aa.experimental.nextScriptWorkers,domainLocales:null==(c=aa.i18n)?void 0:c.domains,crossOrigin:aa.crossOrigin,multiZoneDraftMode:p,basePath:aa.basePath,canonicalBase:aa.amp.canonicalBase||"",ampOptimizerConfig:null==(f=aa.experimental.amp)?void 0:f.optimizer,disableOptimizedLoading:aa.experimental.disableOptimizedLoading,largePageDataBytes:aa.experimental.largePageDataBytes,runtimeConfig:Object.keys(q).length>0?q:void 0,isExperimentalCompile:ac,experimental:{clientTraceMetadata:aa.experimental.clientTraceMetadata||[]},locale:Y,locales:Z,defaultLocale:$,setIsrStatus:null==_?void 0:_.setIsrStatus,isNextDataRequest:ak&&(ad||ae),resolvedUrl:e,resolvedAsPath:ad||ag?(0,i.formatUrl)({pathname:ak?(0,m.normalizeDataPath)(O):O,query:N}):e,isOnDemandRevalidate:W,ErrorDebug:(0,j.getRequestMeta)(a,"PagesErrorDebug"),err:(0,j.getRequestMeta)(a,"invokeError"),dev:T.isDev,distDir:`${T.projectDir}/${T.distDir}`,ampSkipValidation:null==(u=aa.experimental.amp)?void 0:u.skipValidation,ampValidator:(0,j.getRequestMeta)(a,"ampValidator")}}).then(a=>{let{metadata:b}=a,c=b.cacheControl;return"isNotFound"in b&&b.isNotFound?{value:null,cacheControl:c}:b.isRedirect?{value:{kind:n.CachedRouteKind.REDIRECT,props:b.pageData??b.flightData},cacheControl:c}:{value:{kind:n.CachedRouteKind.PAGES,html:a,pageData:a.metadata.pageData,headers:a.metadata.headers,status:a.metadata.statusCode},cacheControl:c}}).finally(()=>{if(!h)return;h.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=ao.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==g.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route");if(e){let a=`${d} ${e}`;h.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),h.updateName(a)}else h.updateName(`${d} ${a.url}`)})}catch(b){throw(null==t?void 0:t.isStale)&&await T.onRequestError(a,b,{routerKind:"Pages Router",routePath:o,routeType:"render",revalidateReason:(0,l.c)({isRevalidate:ae,isOnDemandRevalidate:W})},_),b}};if(t&&(aj=!1),aj){let b=await T.getResponseCache(a).get(T.isDev?null:Y?`/${Y}${o}`:o,async({previousCacheEntry:a=null})=>T.isDev?v():(0,A.toResponseCacheEntry)(a),{routeKind:f.RouteKind.PAGES,isFallback:!0,isRoutePPREnabled:!1,isOnDemandRevalidate:!1,incrementalCache:await T.getIncrementalCache(a,aa,U),waitUntil:c.waitUntil});if(b)return delete b.cacheControl,b.isMiss=!0,b}return!(0,j.getRequestMeta)(a,"minimalMode")&&W&&X&&!t?(b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null):aj&&(null==t||null==(u=t.value)?void 0:u.kind)===n.CachedRouteKind.PAGES?{value:{kind:n.CachedRouteKind.PAGES,html:new z.default(Buffer.from(t.value.html),{contentType:"text/html;utf-8",metadata:{statusCode:t.value.status,headers:t.value.headers}}),pageData:{},status:t.value.status,headers:t.value.headers},cacheControl:{revalidate:0,expire:void 0}}:v()},F=await T.handleResponse({cacheKey:ai,req:a,nextConfig:aa,routeKind:f.RouteKind.PAGES,isOnDemandRevalidate:W,revalidateOnlyGenerated:X,waitUntil:c.waitUntil,responseGenerator:E,prerenderManifest:U});if(!aj||(null==F?void 0:F.isMiss)||(aj=!1),F){if(ae&&!(0,j.getRequestMeta)(a,"minimalMode")&&b.setHeader("x-nextjs-cache",W?"REVALIDATED":F.isMiss?"MISS":F.isStale?"STALE":"HIT"),!ae||aj)b.getHeader("Cache-Control")||(D={revalidate:0,expire:void 0});else if(al){let b=(0,j.getRequestMeta)(a,"notFoundRevalidate");D={revalidate:void 0===b?0:b,expire:void 0}}else if(am)D={revalidate:0,expire:void 0};else if(F.cacheControl)if("number"==typeof F.cacheControl.revalidate){if(F.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${F.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});D={revalidate:F.cacheControl.revalidate,expire:(null==(t=F.cacheControl)?void 0:t.expire)??aa.expireTime}}else D={revalidate:x.CACHE_ONE_YEAR,expire:void 0};if(D&&!b.getHeader("Cache-Control")&&b.setHeader("Cache-Control",(0,u.getCacheControlHeader)(D)),!F.value)return((0,j.addRequestMeta)(a,"notFoundRevalidate",null==(B=F.cacheControl)?void 0:B.revalidate),b.statusCode=404,ak)?void b.end('{"notFound":true}'):void((null==_?void 0:_.render404)?await _.render404(a,b,I,!1):b.end("This page could not be found"));if(F.value.kind===n.CachedRouteKind.REDIRECT)if(!ak)return await (a=>{let c={destination:a.pageProps.__N_REDIRECT,statusCode:a.pageProps.__N_REDIRECT_STATUS,basePath:a.pageProps.__N_REDIRECT_BASE_PATH},d=(0,w.getRedirectStatus)(c),{basePath:e}=aa;e&&!1!==c.basePath&&c.destination.startsWith("/")&&(c.destination=`${e}${c.destination}`),c.destination.startsWith("/")&&(c.destination=(0,v.normalizeRepeatedSlashes)(c.destination)),b.statusCode=d,b.setHeader("Location",c.destination),d===C.RedirectStatusCode.PermanentRedirect&&b.setHeader("Refresh",`0;url=${c.destination}`),b.end(c.destination)})(F.value.props),null;else{b.setHeader("content-type","application/json"),b.end(JSON.stringify(F.value.props));return}if(F.value.kind!==n.CachedRouteKind.PAGES)throw Object.defineProperty(Error("Invariant: received non-pages cache entry in pages handler"),"__NEXT_ERROR_CODE",{value:"E695",enumerable:!1,configurable:!0});if(T.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),V&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),(0,j.getRequestMeta)(a,"customErrorRender")||an&&(0,j.getRequestMeta)(a,"minimalMode")&&500===b.statusCode)return null;await (0,y.sendRenderResult)({req:a,res:b,result:!ak||an||am?F.value.html:new z.default(Buffer.from(JSON.stringify(F.value.pageData)),{contentType:"application/json",metadata:F.value.html.metadata}),generateEtags:aa.generateEtags,poweredByHeader:aa.poweredByHeader,cacheControl:T.isDev?void 0:D,type:ak?"json":"html"})}};ap?await t():await ao.withPropagatedContext(a.headers,()=>ao.trace(g.BaseServerSpan.handleRequest,{spanName:`${d} ${a.url}`,kind:h.SpanKind.SERVER,attributes:{"http.method":d,"http.target":a.url}},t))}catch(b){throw await T.onRequestError(a,b,{routerKind:"Pages Router",routePath:o,routeType:"render",revalidateReason:(0,l.c)({isRevalidate:ae,isOnDemandRevalidate:W})},_),b}}d()}catch(a){d(a)}})}};var b=require("../webpack-runtime.js");b.C(a);var c=b.X(0,[616,64],()=>b(b.s=9875));module.exports=c})(); \ No newline at end of file diff --git a/.next/server/pages/_error.js.nft.json b/.next/server/pages/_error.js.nft.json new file mode 100644 index 0000000..18541d8 --- /dev/null +++ b/.next/server/pages/_error.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/@tanstack/query-core/build/legacy/focusManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/hydration.cjs","../../../node_modules/@tanstack/query-core/build/legacy/index.cjs","../../../node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.cjs","../../../node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutation.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutationCache.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/onlineManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queriesObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/query.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryCache.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryClient.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/removable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/retryer.cjs","../../../node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs","../../../node_modules/@tanstack/query-core/build/legacy/subscribable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/thenable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/types.cjs","../../../node_modules/@tanstack/query-core/build/legacy/utils.cjs","../../../node_modules/@tanstack/query-core/build/modern/focusManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../node_modules/@tanstack/query-core/build/modern/hydration.cjs","../../../node_modules/@tanstack/query-core/build/modern/hydration.js","../../../node_modules/@tanstack/query-core/build/modern/index.cjs","../../../node_modules/@tanstack/query-core/build/modern/index.js","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js","../../../node_modules/@tanstack/query-core/build/modern/mutation.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutation.js","../../../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../node_modules/@tanstack/query-core/build/modern/query.cjs","../../../node_modules/@tanstack/query-core/build/modern/query.js","../../../node_modules/@tanstack/query-core/build/modern/queryCache.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../node_modules/@tanstack/query-core/build/modern/queryClient.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../node_modules/@tanstack/query-core/build/modern/removable.cjs","../../../node_modules/@tanstack/query-core/build/modern/removable.js","../../../node_modules/@tanstack/query-core/build/modern/retryer.cjs","../../../node_modules/@tanstack/query-core/build/modern/retryer.js","../../../node_modules/@tanstack/query-core/build/modern/streamedQuery.cjs","../../../node_modules/@tanstack/query-core/build/modern/streamedQuery.js","../../../node_modules/@tanstack/query-core/build/modern/subscribable.cjs","../../../node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../node_modules/@tanstack/query-core/build/modern/thenable.cjs","../../../node_modules/@tanstack/query-core/build/modern/thenable.js","../../../node_modules/@tanstack/query-core/build/modern/types.cjs","../../../node_modules/@tanstack/query-core/build/modern/types.js","../../../node_modules/@tanstack/query-core/build/modern/utils.cjs","../../../node_modules/@tanstack/query-core/build/modern/utils.js","../../../node_modules/@tanstack/query-core/package.json","../../../node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs","../../../node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs","../../../node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs","../../../node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs","../../../node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs","../../../node_modules/@tanstack/react-query/build/legacy/index.cjs","../../../node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/suspense.cjs","../../../node_modules/@tanstack/react-query/build/legacy/types.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useMutation.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useMutationState.cjs","../../../node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useQueries.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.cjs","../../../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js","../../../node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","../../../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../node_modules/@tanstack/react-query/build/modern/index.js","../../../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js","../../../node_modules/@tanstack/react-query/build/modern/mutationOptions.js","../../../node_modules/@tanstack/react-query/build/modern/queryOptions.js","../../../node_modules/@tanstack/react-query/build/modern/suspense.js","../../../node_modules/@tanstack/react-query/build/modern/types.js","../../../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useIsFetching.js","../../../node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../node_modules/@tanstack/react-query/build/modern/useMutationState.js","../../../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js","../../../node_modules/@tanstack/react-query/package.json","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/next/dist/client/components/app-router-headers.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/constants.js","../../../node_modules/next/dist/lib/interop-default.js","../../../node_modules/next/dist/lib/is-error.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../node_modules/next/dist/server/lib/lru-cache.js","../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/server/load-manifest.external.js","../../../node_modules/next/dist/server/response-cache/types.js","../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../node_modules/next/dist/shared/lib/page-path/normalize-data-path.js","../../../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js","../../../node_modules/next/dist/shared/lib/router/utils/format-url.js","../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../node_modules/next/dist/shared/lib/router/utils/parse-path.js","../../../node_modules/next/dist/shared/lib/router/utils/querystring.js","../../../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js","../../../node_modules/next/dist/shared/lib/utils.js","../../../node_modules/next/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../package.json","../chunks/616.js","../chunks/64.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/.next/server/pages/index.html b/.next/server/pages/index.html new file mode 100644 index 0000000..b80d71b --- /dev/null +++ b/.next/server/pages/index.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/.next/server/pages/index.js.nft.json b/.next/server/pages/index.js.nft.json new file mode 100644 index 0000000..5614afa --- /dev/null +++ b/.next/server/pages/index.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../../../node_modules/@remix-run/router/dist/router.cjs.js","../../../node_modules/@remix-run/router/package.json","../../../node_modules/@swc/helpers/_/_interop_require_wildcard/package.json","../../../node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs","../../../node_modules/@swc/helpers/package.json","../../../node_modules/@tanstack/query-core/build/legacy/focusManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/hydration.cjs","../../../node_modules/@tanstack/query-core/build/legacy/index.cjs","../../../node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.cjs","../../../node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutation.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutationCache.cjs","../../../node_modules/@tanstack/query-core/build/legacy/mutationObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/notifyManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/onlineManager.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queriesObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/query.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryCache.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryClient.cjs","../../../node_modules/@tanstack/query-core/build/legacy/queryObserver.cjs","../../../node_modules/@tanstack/query-core/build/legacy/removable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/retryer.cjs","../../../node_modules/@tanstack/query-core/build/legacy/streamedQuery.cjs","../../../node_modules/@tanstack/query-core/build/legacy/subscribable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/thenable.cjs","../../../node_modules/@tanstack/query-core/build/legacy/types.cjs","../../../node_modules/@tanstack/query-core/build/legacy/utils.cjs","../../../node_modules/@tanstack/query-core/build/modern/focusManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../node_modules/@tanstack/query-core/build/modern/hydration.cjs","../../../node_modules/@tanstack/query-core/build/modern/hydration.js","../../../node_modules/@tanstack/query-core/build/modern/index.cjs","../../../node_modules/@tanstack/query-core/build/modern/index.js","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js","../../../node_modules/@tanstack/query-core/build/modern/mutation.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutation.js","../../../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs","../../../node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../node_modules/@tanstack/query-core/build/modern/query.cjs","../../../node_modules/@tanstack/query-core/build/modern/query.js","../../../node_modules/@tanstack/query-core/build/modern/queryCache.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../node_modules/@tanstack/query-core/build/modern/queryClient.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs","../../../node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../node_modules/@tanstack/query-core/build/modern/removable.cjs","../../../node_modules/@tanstack/query-core/build/modern/removable.js","../../../node_modules/@tanstack/query-core/build/modern/retryer.cjs","../../../node_modules/@tanstack/query-core/build/modern/retryer.js","../../../node_modules/@tanstack/query-core/build/modern/streamedQuery.cjs","../../../node_modules/@tanstack/query-core/build/modern/streamedQuery.js","../../../node_modules/@tanstack/query-core/build/modern/subscribable.cjs","../../../node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../node_modules/@tanstack/query-core/build/modern/thenable.cjs","../../../node_modules/@tanstack/query-core/build/modern/thenable.js","../../../node_modules/@tanstack/query-core/build/modern/types.cjs","../../../node_modules/@tanstack/query-core/build/modern/types.js","../../../node_modules/@tanstack/query-core/build/modern/utils.cjs","../../../node_modules/@tanstack/query-core/build/modern/utils.js","../../../node_modules/@tanstack/query-core/package.json","../../../node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs","../../../node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs","../../../node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs","../../../node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs","../../../node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs","../../../node_modules/@tanstack/react-query/build/legacy/index.cjs","../../../node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs","../../../node_modules/@tanstack/react-query/build/legacy/suspense.cjs","../../../node_modules/@tanstack/react-query/build/legacy/types.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useIsFetching.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useMutation.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useMutationState.cjs","../../../node_modules/@tanstack/react-query/build/legacy/usePrefetchInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/usePrefetchQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useQueries.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.cjs","../../../node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.cjs","../../../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js","../../../node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","../../../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../node_modules/@tanstack/react-query/build/modern/index.js","../../../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js","../../../node_modules/@tanstack/react-query/build/modern/mutationOptions.js","../../../node_modules/@tanstack/react-query/build/modern/queryOptions.js","../../../node_modules/@tanstack/react-query/build/modern/suspense.js","../../../node_modules/@tanstack/react-query/build/modern/types.js","../../../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useIsFetching.js","../../../node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../node_modules/@tanstack/react-query/build/modern/useMutationState.js","../../../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js","../../../node_modules/@tanstack/react-query/package.json","../../../node_modules/@vercel/analytics/dist/react/index.mjs","../../../node_modules/@vercel/analytics/package.json","../../../node_modules/@vercel/speed-insights/dist/react/index.mjs","../../../node_modules/@vercel/speed-insights/package.json","../../../node_modules/asynckit/index.js","../../../node_modules/asynckit/lib/abort.js","../../../node_modules/asynckit/lib/async.js","../../../node_modules/asynckit/lib/defer.js","../../../node_modules/asynckit/lib/iterate.js","../../../node_modules/asynckit/lib/state.js","../../../node_modules/asynckit/lib/terminator.js","../../../node_modules/asynckit/package.json","../../../node_modules/asynckit/parallel.js","../../../node_modules/asynckit/serial.js","../../../node_modules/asynckit/serialOrdered.js","../../../node_modules/axios/index.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/adapters/fetch.js","../../../node_modules/axios/lib/adapters/http.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/AxiosTransformStream.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/helpers/callbackify.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/helpers/composeSignals.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/helpers/formDataToStream.js","../../../node_modules/axios/lib/helpers/fromDataURI.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/progressEventReducer.js","../../../node_modules/axios/lib/helpers/readBlob.js","../../../node_modules/axios/lib/helpers/resolveConfig.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/throttle.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/trackStream.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/platform/node/classes/FormData.js","../../../node_modules/axios/lib/platform/node/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/node/index.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/node_modules/form-data/lib/form_data.js","../../../node_modules/axios/node_modules/form-data/lib/populate.js","../../../node_modules/axios/node_modules/form-data/package.json","../../../node_modules/axios/package.json","../../../node_modules/call-bind-apply-helpers/actualApply.js","../../../node_modules/call-bind-apply-helpers/functionApply.js","../../../node_modules/call-bind-apply-helpers/functionCall.js","../../../node_modules/call-bind-apply-helpers/index.js","../../../node_modules/call-bind-apply-helpers/package.json","../../../node_modules/call-bind-apply-helpers/reflectApply.js","../../../node_modules/client-only/index.js","../../../node_modules/client-only/package.json","../../../node_modules/combined-stream/lib/combined_stream.js","../../../node_modules/combined-stream/package.json","../../../node_modules/debug/package.json","../../../node_modules/debug/src/browser.js","../../../node_modules/debug/src/common.js","../../../node_modules/debug/src/index.js","../../../node_modules/debug/src/node.js","../../../node_modules/delayed-stream/lib/delayed_stream.js","../../../node_modules/delayed-stream/package.json","../../../node_modules/dunder-proto/get.js","../../../node_modules/dunder-proto/package.json","../../../node_modules/es-define-property/index.js","../../../node_modules/es-define-property/package.json","../../../node_modules/es-errors/eval.js","../../../node_modules/es-errors/index.js","../../../node_modules/es-errors/package.json","../../../node_modules/es-errors/range.js","../../../node_modules/es-errors/ref.js","../../../node_modules/es-errors/syntax.js","../../../node_modules/es-errors/type.js","../../../node_modules/es-errors/uri.js","../../../node_modules/es-object-atoms/index.js","../../../node_modules/es-object-atoms/package.json","../../../node_modules/es-set-tostringtag/index.js","../../../node_modules/es-set-tostringtag/package.json","../../../node_modules/follow-redirects/debug.js","../../../node_modules/follow-redirects/index.js","../../../node_modules/follow-redirects/package.json","../../../node_modules/function-bind/implementation.js","../../../node_modules/function-bind/index.js","../../../node_modules/function-bind/package.json","../../../node_modules/get-intrinsic/index.js","../../../node_modules/get-intrinsic/package.json","../../../node_modules/get-proto/Object.getPrototypeOf.js","../../../node_modules/get-proto/Reflect.getPrototypeOf.js","../../../node_modules/get-proto/index.js","../../../node_modules/get-proto/package.json","../../../node_modules/gopd/gOPD.js","../../../node_modules/gopd/index.js","../../../node_modules/gopd/package.json","../../../node_modules/has-flag/index.js","../../../node_modules/has-flag/package.json","../../../node_modules/has-symbols/index.js","../../../node_modules/has-symbols/package.json","../../../node_modules/has-symbols/shams.js","../../../node_modules/has-tostringtag/package.json","../../../node_modules/has-tostringtag/shams.js","../../../node_modules/hasown/index.js","../../../node_modules/hasown/package.json","../../../node_modules/math-intrinsics/abs.js","../../../node_modules/math-intrinsics/floor.js","../../../node_modules/math-intrinsics/isNaN.js","../../../node_modules/math-intrinsics/max.js","../../../node_modules/math-intrinsics/min.js","../../../node_modules/math-intrinsics/package.json","../../../node_modules/math-intrinsics/pow.js","../../../node_modules/math-intrinsics/round.js","../../../node_modules/math-intrinsics/sign.js","../../../node_modules/mime-db/db.json","../../../node_modules/mime-db/index.js","../../../node_modules/mime-db/package.json","../../../node_modules/mime-types/index.js","../../../node_modules/mime-types/package.json","../../../node_modules/ms/index.js","../../../node_modules/ms/package.json","../../../node_modules/next/dist/client/components/app-router-headers.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../node_modules/next/dist/lib/constants.js","../../../node_modules/next/dist/lib/interop-default.js","../../../node_modules/next/dist/lib/is-error.js","../../../node_modules/next/dist/lib/semver-noop.js","../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../node_modules/next/dist/server/lib/lru-cache.js","../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/server/load-manifest.external.js","../../../node_modules/next/dist/server/response-cache/types.js","../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../node_modules/next/dist/shared/lib/page-path/normalize-data-path.js","../../../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js","../../../node_modules/next/dist/shared/lib/router/utils/format-url.js","../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../node_modules/next/dist/shared/lib/router/utils/parse-path.js","../../../node_modules/next/dist/shared/lib/router/utils/querystring.js","../../../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js","../../../node_modules/next/dist/shared/lib/utils.js","../../../node_modules/next/package.json","../../../node_modules/proxy-from-env/index.js","../../../node_modules/proxy-from-env/package.json","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../node_modules/react-dom/cjs/react-dom-server.browser.production.min.js","../../../node_modules/react-dom/cjs/react-dom.development.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/package.json","../../../node_modules/react-dom/server.browser.js","../../../node_modules/react-router-dom/dist/main.js","../../../node_modules/react-router-dom/dist/umd/react-router-dom.development.js","../../../node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js","../../../node_modules/react-router-dom/package.json","../../../node_modules/react-router/dist/main.js","../../../node_modules/react-router/dist/umd/react-router.development.js","../../../node_modules/react-router/dist/umd/react-router.production.min.js","../../../node_modules/react-router/package.json","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react.development.js","../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/package.json","../../../node_modules/scheduler/cjs/scheduler.development.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/scheduler/package.json","../../../node_modules/styled-jsx/dist/index/index.js","../../../node_modules/styled-jsx/index.js","../../../node_modules/styled-jsx/package.json","../../../node_modules/supports-color/index.js","../../../node_modules/supports-color/package.json","../../../package.json","../../../src/App.tsx","../../../src/components/CardImageDisplay.tsx","../../../src/components/GlowingCard.tsx","../../../src/components/ResponsiveLayout.tsx","../../../src/components/admin/AdminPanel.tsx","../../../src/components/admin/CardLoader.tsx","../../../src/components/admin/SystemStats.tsx","../../../src/components/admin/UserManagement.tsx","../../../src/components/auth/LoginForm.tsx","../../../src/components/auth/RegisterForm.tsx","../../../src/components/cards/CardDatabaseBrowser.tsx","../../../src/components/cards/CardManager.tsx","../../../src/components/cards/CardSearch.tsx","../../../src/components/collections/CollectionManager.tsx","../../../src/components/decks/DeckManager.tsx","../../../src/components/scanner/AutoScanningCamera.tsx","../../../src/components/scanner/BulkOperations.tsx","../../../src/components/scanner/CardQueue.tsx","../../../src/components/scanner/ScanModeSelector.tsx","../../../src/components/scanner/ScannerWizard.tsx","../../../src/components/scanner/ScanningToast.tsx","../../../src/contexts/ThemeContext.tsx","../../../src/hooks/use3DTilt.ts","../../../src/pages/Cards.tsx","../../../src/pages/Collections.tsx","../../../src/pages/Dashboard.tsx","../../../src/pages/Decks.tsx","../../../src/pages/Scanner.tsx","../../../src/pages/Settings.tsx","../../../src/services/aiOcr.ts","../../../src/services/autoTagger.ts","../../../src/services/cardDataSources.ts","../../../src/services/tcgApi.ts","../../package.json","../chunks/616.js","../chunks/64.js","../chunks/855.js","../webpack-runtime.js"]} \ No newline at end of file diff --git a/.next/server/webpack-runtime.js b/.next/server/webpack-runtime.js new file mode 100644 index 0000000..f28fd38 --- /dev/null +++ b/.next/server/webpack-runtime.js @@ -0,0 +1 @@ +(()=>{"use strict";var a={},b={};function c(d){var e=b[d];if(void 0!==e)return e.exports;var f=b[d]={exports:{}},g=!0;try{a[d](f,f.exports,c),g=!1}finally{g&&delete b[d]}return f.exports}c.m=a,(()=>{var a="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",b="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",d="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",e=a=>{a&&a.d<1&&(a.d=1,a.forEach(a=>a.r--),a.forEach(a=>a.r--?a.r++:a()))};c.a=(c,f,g)=>{g&&((h=[]).d=-1);var h,i,j,k,l=new Set,m=c.exports,n=new Promise((a,b)=>{k=b,j=a});n[b]=m,n[a]=a=>(h&&a(h),l.forEach(a),n.catch(a=>{})),c.exports=n,f(c=>{i=c.map(c=>{if(null!==c&&"object"==typeof c){if(c[a])return c;if(c.then){var f=[];f.d=0,c.then(a=>{g[b]=a,e(f)},a=>{g[d]=a,e(f)});var g={};return g[a]=a=>a(f),g}}var h={};return h[a]=a=>{},h[b]=c,h});var f,g=()=>i.map(a=>{if(a[d])throw a[d];return a[b]}),j=new Promise(b=>{(f=()=>b(g)).r=0;var c=a=>a!==h&&!l.has(a)&&(l.add(a),a&&!a.d&&(f.r++,a.push(f)));i.map(b=>b[a](c))});return f.r?j:g()},a=>(a?k(n[d]=a):j(m),e(h))),h&&h.d<0&&(h.d=0)}})(),c.n=a=>{var b=a&&a.__esModule?()=>a.default:()=>a;return c.d(b,{a:b}),b},c.d=(a,b)=>{for(var d in b)c.o(b,d)&&!c.o(a,d)&&Object.defineProperty(a,d,{enumerable:!0,get:b[d]})},c.f={},c.e=a=>Promise.all(Object.keys(c.f).reduce((b,d)=>(c.f[d](a,b),b),[])),c.u=a=>""+a+".js",c.o=(a,b)=>Object.prototype.hasOwnProperty.call(a,b),c.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},c.X=(a,b,d)=>{var e=b;d||(b=a,d=()=>c(c.s=e)),b.map(c.e,c);var f=d();return void 0===f?a:f},(()=>{var a={311:1},b=b=>{var d=b.modules,e=b.ids,f=b.runtime;for(var g in d)c.o(d,g)&&(c.m[g]=d[g]);f&&f(c);for(var h=0;h{a[d]||(311!=d?b(require("./chunks/"+c.u(d))):a[d]=1)},module.exports=c,c.C=b})()})(); \ No newline at end of file diff --git a/.next/static/chunks/469.31893841137c9659.js b/.next/static/chunks/469.31893841137c9659.js new file mode 100644 index 0000000..327cef1 --- /dev/null +++ b/.next/static/chunks/469.31893841137c9659.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[469],{97:(e,t,r)=>{"use strict";r.d(t,{n:()=>c});var n=r(4232),i=r(1407),o=r(388),s=r(89),a=r(7149),u=class extends s.Q{#e;#t=void 0;#r;#n;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.EN)(t.mutationKey)!==(0,a.EN)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#o()}mutate(e,t){return this.#n=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){let e=this.#r?.state??(0,i.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){o.jG.batch(()=>{if(this.#n&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context;e?.type==="success"?(this.#n.onSuccess?.(e.data,t,r),this.#n.onSettled?.(e.data,null,t,r)):e?.type==="error"&&(this.#n.onError?.(e.error,t,r),this.#n.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(e=>{e(this.#t)})})}},l=r(7768);function c(e,t){let r=(0,l.jE)(t),[i]=n.useState(()=>new u(r,e));n.useEffect(()=>{i.setOptions(e)},[i,e]);let s=n.useSyncExternalStore(n.useCallback(e=>i.subscribe(o.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),c=n.useCallback((e,t)=>{i.mutate(e,t).catch(a.lQ)},[i]);if(s.error&&(0,a.GU)(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:c,mutateAsync:s.mutate}}},973:(e,t,r)=>{"use strict";r.d(t,{j:()=>u});var n=r(4232),i=r(5364);function o(){return"undefined"!=typeof window}function s(){return"production"}function a(){return"development"===((o()?window.vam:s())||"production")}function u(e){return(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,n.useEffect)(()=>{!function(e={debug:!0}){var t;if(!o())return;!function(e="auto"){if("auto"===e){window.vam=s();return}window.vam=e}(e.mode),window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let r=e.scriptSrc?e.scriptSrc:a()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return;let n=document.createElement("script");n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.5.0",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=a()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${e}`)},a()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==i&&void 0!==i.env)return i.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,n.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}},1040:(e,t,r)=>{"use strict";let n;r.d(t,{A:()=>ts});var i,o,s,a={};function u(e,t){return function(){return e.apply(t,arguments)}}r.r(a),r.d(a,{hasBrowserEnv:()=>eh,hasStandardBrowserEnv:()=>ed,hasStandardBrowserWebWorkerEnv:()=>ey,navigator:()=>ep,origin:()=>em});var l=r(5364);let{toString:c}=Object.prototype,{getPrototypeOf:f}=Object,{iterator:h,toStringTag:p}=Symbol,d=(e=>t=>{let r=c.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),y=e=>(e=e.toLowerCase(),t=>d(t)===e),m=e=>t=>typeof t===e,{isArray:g}=Array,b=m("undefined"),v=y("ArrayBuffer"),w=m("string"),E=m("function"),R=m("number"),S=e=>null!==e&&"object"==typeof e,O=e=>{if("object"!==d(e))return!1;let t=f(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(p in e)&&!(h in e)},T=y("Date"),A=y("File"),x=y("Blob"),C=y("FileList"),U=y("URLSearchParams"),[B,P,k,j]=["ReadableStream","Request","Response","Headers"].map(y);function L(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),g(e))for(n=0,i=e.length;n0;)if(t===(r=n[i]).toLowerCase())return r;return null}let N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,_=e=>!b(e)&&e!==N,F=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&f(Uint8Array)),D=y("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Q=y("RegExp"),q=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};L(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},z=y("AsyncFunction"),$=(i="function"==typeof setImmediate,o=E(N.postMessage),i?setImmediate:o?((e,t)=>(N.addEventListener("message",({source:r,data:n})=>{r===N&&n===e&&t.length&&t.shift()()},!1),r=>{t.push(r),N.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e)),W="undefined"!=typeof queueMicrotask?queueMicrotask.bind(N):void 0!==l&&l.nextTick||$,H={isArray:g,isArrayBuffer:v,isBuffer:function(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||E(e.append)&&("formdata"===(t=d(e))||"object"===t&&E(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&v(e.buffer)},isString:w,isNumber:R,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:O,isReadableStream:B,isRequest:P,isResponse:k,isHeaders:j,isUndefined:b,isDate:T,isFile:A,isBlob:x,isRegExp:Q,isFunction:E,isStream:e=>S(e)&&E(e.pipe),isURLSearchParams:U,isTypedArray:F,isFileList:C,forEach:L,merge:function e(){let{caseless:t}=_(this)&&this||{},r={},n=(n,i)=>{let o=t&&I(r,i)||i;O(r[o])&&O(n)?r[o]=e(r[o],n):O(n)?r[o]=e({},n):g(n)?r[o]=n.slice():r[o]=n};for(let e=0,t=arguments.length;e(L(t,(t,n)=>{r&&E(t)?e[n]=u(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s,a={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=!1!==r&&f(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:y,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(g(e))return e;let t=e.length;if(!R(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[h]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:D,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:q,freezeMethods:e=>{q(e,(t,r)=>{if(E(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(E(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(g(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:I,global:N,isContextDefined:_,isSpecCompliantForm:function(e){return!!(e&&E(e.append)&&"FormData"===e[p]&&e[h])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;let i=g(e)?[]:{};return L(e,(e,t)=>{let o=r(e,n+1);b(o)||(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:z,isThenable:e=>e&&(S(e)||E(e))&&E(e.then)&&E(e.catch),setImmediate:$,asap:W,isIterable:e=>null!=e&&E(e[h])};function J(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});let V=J.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{K[e]={value:e}}),Object.defineProperties(J,K),Object.defineProperty(V,"isAxiosError",{value:!0}),J.from=(e,t,r,n,i,o)=>{let s=Object.create(V);return H.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),J.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var G=r(8220).Buffer;function X(e){return H.isPlainObject(e)||H.isArray(e)}function Y(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,r){return e?e.concat(t).map(function(e,t){return e=Y(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let ee=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)}),et=function(e,t,r){if(!H.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!H.isUndefined(t[e])})).metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw TypeError("visitor must be a function");function u(e){if(null===e)return"";if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!a&&H.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(e)||H.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):G.from(e):e}function l(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(H.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var l;if(H.isArray(e)&&(l=e,H.isArray(l)&&!l.some(X))||(H.isFileList(e)||H.endsWith(r,"[]"))&&(a=H.toArray(e)))return r=Y(r),a.forEach(function(e,n){H.isUndefined(e)||null===e||t.append(!0===s?Z([r],n,o):null===s?r:r+"[]",u(e))}),!1}return!!X(e)||(t.append(Z(i,r,o),u(e)),!1)}let c=[],f=Object.assign(ee,{defaultVisitor:l,convertValue:u,isVisitable:X});if(!H.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!H.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),H.forEach(r,function(r,o){!0===(!(H.isUndefined(r)||null===r)&&i.call(t,r,H.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])}),c.pop()}}(e),t};function er(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function en(e,t){this._pairs=[],e&&et(e,this,t)}let ei=en.prototype;function eo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function es(e,t,r){let n;if(!t)return e;let i=r&&r.encode||eo;H.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize;if(n=o?o(t,r):H.isURLSearchParams(t)?t.toString():new en(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ei.append=function(e,t){this._pairs.push([e,t])},ei.toString=function(e){let t=e?function(t){return e.call(this,t,er)}:er;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class ea{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,function(t){null!==t&&e(t)})}}let eu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},el="undefined"!=typeof URLSearchParams?URLSearchParams:en,ec="undefined"!=typeof FormData?FormData:null,ef="undefined"!=typeof Blob?Blob:null,eh="undefined"!=typeof window&&"undefined"!=typeof document,ep="object"==typeof navigator&&navigator||void 0,ed=eh&&(!ep||0>["ReactNative","NativeScript","NS"].indexOf(ep.product)),ey="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,em=eh&&window.location.href||"http://localhost",eg={...a,isBrowser:!0,classes:{URLSearchParams:el,FormData:ec,Blob:ef},protocols:["http","https","file","blob","url","data"]},eb=function(e){if(H.isFormData(e)&&H.isFunction(e.entries)){let t={};return H.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;let s=Number.isFinite(+o),a=i>=t.length;return(o=!o&&H.isArray(n)?n.length:o,a)?H.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r:(n[o]&&H.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&H.isArray(n[o])&&(n[o]=function(e){let t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null},ev={transitional:eu,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=H.isObject(e);if(o&&H.isHTMLForm(e)&&(e=new FormData(e)),H.isFormData(e))return i?JSON.stringify(eb(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){var s,a;return(s=e,a=this.formSerializer,et(s,new eg.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return eg.isNode&&H.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},a))).toString()}if((r=H.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return et(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(o||i){t.setContentType("application/json",!1);var u=e;if(H.isString(u))try{return(0,JSON.parse)(u),H.trim(u)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(u)}return e}],transformResponse:[function(e){let t=this.transitional||ev.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eg.classes.FormData,Blob:eg.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{ev.headers[e]={}});let ew=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),eE=Symbol("internals");function eR(e){return e&&String(e).trim().toLowerCase()}function eS(e){return!1===e||null==e?e:H.isArray(e)?e.map(eS):String(e)}function eO(e,t,r,n,i){if(H.isFunction(n))return n.call(this,t,r);if(i&&(t=r),H.isString(t)){if(H.isString(n))return -1!==t.indexOf(n);if(H.isRegExp(n))return n.test(t)}}class eT{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=eR(t);if(!i)throw Error("header name must be a non-empty string");let o=H.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=eS(e))}let o=(e,t)=>H.forEach(e,(e,r)=>i(e,r,t));if(H.isPlainObject(e)||e instanceof this.constructor)o(e,t);else{let n;if(H.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim())))o((e=>{let t,r,n,i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&ew[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i})(e),t);else if(H.isObject(e)&&H.isIterable(e)){let r={},n,i;for(let t of e){if(!H.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?H.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=eR(e)){let r=H.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(H.isFunction(t))return t.call(this,e,r);if(H.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eR(e)){let r=H.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||eO(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=eR(e)){let i=H.findKey(r,e);i&&(!t||eO(r,r[i],i,t))&&(delete r[i],n=!0)}}return H.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||eO(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return H.forEach(this,(n,i)=>{let o=H.findKey(r,i);if(o){t[o]=eS(n),delete t[i];return}let s=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();s!==i&&delete t[i],t[s]=eS(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return H.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&H.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[eE]=this[eE]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=eR(e);if(!t[n]){let i=H.toCamelCase(" "+e);["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return H.isArray(e)?e.forEach(n):n(e),this}}function eA(e,t){let r=this||ev,n=t||r,i=eT.from(n.headers),o=n.data;return H.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function ex(e){return!!(e&&e.__CANCEL__)}function eC(e,t,r){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,r),this.name="CanceledError"}function eU(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new J("Request failed with status code "+r.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}eT.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(eT.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),H.freezeMethods(eT),H.inherits(eC,J,{__CANCEL__:!0});let eB=function(e,t){let r,n=Array(e=e||10),i=Array(e),o=0,s=0;return t=void 0!==t?t:1e3,function(a){let u=Date.now(),l=i[s];r||(r=u),n[o]=a,i[o]=u;let c=s,f=0;for(;c!==o;)f+=n[c++],c%=e;if((o=(o+1)%e)===s&&(s=(s+1)%e),u-r{i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{let t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},o-a)))},()=>r&&s(r)]},ek=(e,t,r=3)=>{let n=0,i=eB(50,250);return eP(r=>{let o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,u=i(a);n=o,e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&o<=s?(s-o)/u:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},ej=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},eL=e=>(...t)=>H.asap(()=>e(...t)),eI=eg.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,eg.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(eg.origin),eg.navigator&&/(msie|trident)/i.test(eg.navigator.userAgent)):()=>!0,eN=eg.hasStandardBrowserEnv?{write(e,t,r,n,i,o){let s=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),H.isString(n)&&s.push("path="+n),H.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function e_(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let eF=e=>e instanceof eT?{...e}:e;function eD(e,t){t=t||{};let r={};function n(e,t,r,n){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:n},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function i(e,t,r,i){return H.isUndefined(t)?H.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function o(e,t){if(!H.isUndefined(t))return n(void 0,t)}function s(e,t){return H.isUndefined(t)?H.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}let u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>i(eF(e),eF(t),r,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(n){let o=u[n]||i,s=o(e[n],t[n],n);H.isUndefined(s)&&o!==a||(r[n]=s)}),r}let eM=e=>{let t,r=eD({},e),{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:u}=r;if(r.headers=a=eT.from(a),r.url=es(e_(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),H.isFormData(n)){if(eg.hasStandardBrowserEnv||eg.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(t=a.getContentType())){let[e,...r]=t?t.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...r].join("; "))}}if(eg.hasStandardBrowserEnv&&(i&&H.isFunction(i)&&(i=i(r)),i||!1!==i&&eI(r.url))){let e=o&&s&&eN.read(s);e&&a.set(o,e)}return r},eQ="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o,s,a,u=eM(e),l=u.data,c=eT.from(u.headers).normalize(),{responseType:f,onUploadProgress:h,onDownloadProgress:p}=u;function d(){s&&s(),a&&a(),u.cancelToken&&u.cancelToken.unsubscribe(n),u.signal&&u.signal.removeEventListener("abort",n)}let y=new XMLHttpRequest;function m(){if(!y)return;let n=eT.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());eU(function(e){t(e),d()},function(e){r(e),d()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(u.method.toUpperCase(),u.url,!0),y.timeout=u.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new J("Request aborted",J.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new J("Network Error",J.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",n=u.transitional||eu;u.timeoutErrorMessage&&(t=u.timeoutErrorMessage),r(new J(t,n.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,y)),y=null},void 0===l&&c.setContentType(null),"setRequestHeader"in y&&H.forEach(c.toJSON(),function(e,t){y.setRequestHeader(t,e)}),H.isUndefined(u.withCredentials)||(y.withCredentials=!!u.withCredentials),f&&"json"!==f&&(y.responseType=u.responseType),p&&([o,a]=ek(p,!0),y.addEventListener("progress",o)),h&&y.upload&&([i,s]=ek(h),y.upload.addEventListener("progress",i),y.upload.addEventListener("loadend",s)),(u.cancelToken||u.signal)&&(n=t=>{y&&(r(!t||t.type?new eC(null,e,y):t),y.abort(),y=null)},u.cancelToken&&u.cancelToken.subscribe(n),u.signal&&(u.signal.aborted?n():u.signal.addEventListener("abort",n)));let g=function(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u.url);if(g&&-1===eg.protocols.indexOf(g))return void r(new J("Unsupported protocol "+g+":",J.ERR_BAD_REQUEST,e));y.send(l||null)})},eq=function*(e,t){let r,n=e.byteLength;if(!t||n{let i,o=ez(e,t),s=0,a=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t){a(),e.close();return}let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},eH="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,eJ=eH&&"function"==typeof ReadableStream,eV=eH&&("function"==typeof TextEncoder?(n=new TextEncoder,e=>n.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer())),eK=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},eG=eJ&&eK(()=>{let e=!1,t=new Request(eg.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),eX=eJ&&eK(()=>H.isReadableStream(new Response("").body)),eY={stream:eX&&(e=>e.body)};eH&&(s=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{eY[e]||(eY[e]=H.isFunction(s[e])?t=>t[e]():(t,r)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,r)})}));let eZ=async e=>{if(null==e)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e)){let t=new Request(eg.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return H.isArrayBufferView(e)||H.isArrayBuffer(e)?e.byteLength:(H.isURLSearchParams(e)&&(e+=""),H.isString(e))?(await eV(e)).byteLength:void 0},e0=async(e,t)=>{let r=H.toFiniteNumber(e.getContentLength());return null==r?eZ(t):r},e1={http:null,xhr:eQ,fetch:eH&&(async e=>{let t,r,{url:n,method:i,data:o,signal:s,cancelToken:a,timeout:u,onDownloadProgress:l,onUploadProgress:c,responseType:f,headers:h,withCredentials:p="same-origin",fetchOptions:d}=eM(e);f=f?(f+"").toLowerCase():"text";let y=((e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,s();let t=e instanceof Error?e:this.reason;n.abort(t instanceof J?t:new eC(t instanceof Error?t.message:t))}},o=t&&setTimeout(()=>{o=null,i(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:a}=n;return a.unsubscribe=()=>H.asap(s),a}})([s,a&&a.toAbortSignal()],u),m=y&&y.unsubscribe&&(()=>{y.unsubscribe()});try{if(c&&eG&&"get"!==i&&"head"!==i&&0!==(r=await e0(h,o))){let e,t=new Request(n,{method:"POST",body:o,duplex:"half"});if(H.isFormData(o)&&(e=t.headers.get("content-type"))&&h.setContentType(e),t.body){let[e,n]=ej(r,ek(eL(c)));o=eW(t.body,65536,e,n)}}H.isString(p)||(p=p?"include":"omit");let s="credentials"in Request.prototype;t=new Request(n,{...d,signal:y,method:i.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:s?p:void 0});let a=await fetch(t,d),u=eX&&("stream"===f||"response"===f);if(eX&&(l||u&&m)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=a[t]});let t=H.toFiniteNumber(a.headers.get("content-length")),[r,n]=l&&ej(t,ek(eL(l),!0))||[];a=new Response(eW(a.body,65536,r,()=>{n&&n(),m&&m()}),e)}f=f||"text";let g=await eY[H.findKey(eY,f)||"text"](a,e);return!u&&m&&m(),await new Promise((r,n)=>{eU(r,n,{data:g,headers:eT.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:t})})}catch(r){if(m&&m(),r&&"TypeError"===r.name&&/Load failed|fetch/i.test(r.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,t),{cause:r.cause||r});throw J.from(r,r&&r.code,e,t)}})};H.forEach(e1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let e2=e=>`- ${e}`,e8=e=>H.isFunction(e)||null===e||!1===e,e5={getAdapter:e=>{let t,r,{length:n}=e=H.isArray(e)?e:[e],i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new J("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(e2).join("\n"):" "+e2(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r}};function e6(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eC(null,e)}function e3(e){return e6(e),e.headers=eT.from(e.headers),e.data=eA.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),e5.getAdapter(e.adapter||ev.adapter)(e).then(function(t){return e6(e),t.data=eA.call(e,e.transformResponse,t),t.headers=eT.from(t.headers),t},function(t){return!ex(t)&&(e6(e),t&&t.response&&(t.response.data=eA.call(e,e.transformResponse,t.response),t.response.headers=eT.from(t.response.headers))),Promise.reject(t)})}let e4="1.10.0",e7={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{e7[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let e9={};e7.transitional=function(e,t,r){function n(e,t){return"[Axios v"+e4+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new J(n(i," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!e9[i]&&(e9[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},e7.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let te={assertOptions:function(e,t,r){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],s=t[o];if(s){let t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new J("option "+o+" must be "+r,J.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new J("Unknown option "+o,J.ERR_BAD_OPTION)}},validators:e7},tt=te.validators;class tr{constructor(e){this.defaults=e||{},this.interceptors={request:new ea,response:new ea}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:s}=t=eD(this.defaults,t);void 0!==i&&te.assertOptions(i,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),null!=o&&(H.isFunction(o)?t.paramsSerializer={serialize:o}:te.assertOptions(o,{encode:tt.function,serialize:tt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),te.assertOptions(t,{baseUrl:tt.spelling("baseURL"),withXsrfToken:tt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&H.merge(s.common,s[t.method]);s&&H.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=eT.concat(a,s);let u=[],l=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(l=l&&e.synchronous,u.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let f=0;if(!l){let e=[e3.bind(this),void 0];for(e.unshift.apply(e,u),e.push.apply(e,c),n=e.length,r=Promise.resolve(t);f{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new eC(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason)return void e(this.reason);this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new tn(function(t){e=t}),cancel:e}}}let ti={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ti).forEach(([e,t])=>{ti[t]=e});let to=function e(t){let r=new tr(t),n=u(tr.prototype.request,r);return H.extend(n,tr.prototype,r,{allOwnKeys:!0}),H.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(eD(t,r))},n}(ev);to.Axios=tr,to.CanceledError=eC,to.CancelToken=tn,to.isCancel=ex,to.VERSION=e4,to.toFormData=et,to.AxiosError=J,to.Cancel=to.CanceledError,to.all=function(e){return Promise.all(e)},to.spread=function(e){return function(t){return e.apply(null,t)}},to.isAxiosError=function(e){return H.isObject(e)&&!0===e.isAxiosError},to.mergeConfig=eD,to.AxiosHeaders=eT,to.formToJSON=e=>eb(H.isHTMLForm(e)?new FormData(e):e),to.getAdapter=e5.getAdapter,to.HttpStatusCode=ti,to.default=to;let ts=to},4952:(e,t,r)=>{"use strict";r.d(t,{N_:()=>y});var n,i,o,s,a=r(4232),u=r(8477),l=r(8307),c=r(8116);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,h),{basename:w}=a.useContext(l.jb),E=!1;if("string"==typeof m&&d.test(m)&&(r=m,p))try{let e=new URL(window.location.href),t=new URL(m.startsWith("//")?e.protocol+m:m),r=(0,c.pb)(t.pathname,w);t.origin===e.origin&&null!=r?m=r+t.search+t.hash:E=!0}catch(e){}let R=(0,l.$P)(m,{relative:i}),S=function(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:s,viewTransition:u}=void 0===t?{}:t,f=(0,l.Zp)(),h=(0,l.zy)(),p=(0,l.x$)(e,{relative:s});return a.useCallback(t=>{0!==t.button||r&&"_self"!==r||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),f(e,{replace:void 0!==n?n:(0,c.AO)(h)===(0,c.AO)(p),state:i,preventScrollReset:o,relative:s,viewTransition:u}))},[h,f,p,n,i,r,e,o,s,u])}(m,{replace:s,state:u,target:y,preventScrollReset:g,relative:i,viewTransition:b});return a.createElement("a",f({},v,{href:r||R,onClick:E||o?n:function(e){n&&n(e),e.defaultPrevented||S(e)},ref:t,target:y}))});!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(o||(o={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(s||(s={}))},5364:(e,t,r)=>{"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(5861)},5861:e=>{!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var u=[],l=!1,c=-1;function f(){l&&n&&(l=!1,n.length?u=n.concat(u):c=-1,u.length&&h())}function h(){if(!l){var e=a(f);l=!0;for(var t=u.length;t;){for(n=u,u=[];++c1)for(var r=1;r{"use strict";r.d(t,{I:()=>v});var n=r(8275),i=r(388),o=r(8444),s=r(89),a=r(1883),u=r(7149),l=class extends s.Q{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=(0,a.T)(),this.options.experimental_prefetchInRender||this.#a.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#u=void 0;#l=void 0;#t=void 0;#c;#f;#a;#s;#h;#p;#d;#y;#m;#g;#b=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#u.addObserver(this),c(this.#u,this.options)?this.#v():this.updateResult(),this.#w())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return f(this.#u,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f(this.#u,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#E(),this.#R(),this.#u.removeObserver(this)}setOptions(e){let t=this.options,r=this.#u;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,u.Eh)(this.options.enabled,this.#u))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#u.setOptions(this.options),t._defaulted&&!(0,u.f8)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#u,observer:this});let n=this.hasListeners();n&&h(this.#u,r,this.options,t)&&this.#v(),this.updateResult(),n&&(this.#u!==r||(0,u.Eh)(this.options.enabled,this.#u)!==(0,u.Eh)(t.enabled,this.#u)||(0,u.d2)(this.options.staleTime,this.#u)!==(0,u.d2)(t.staleTime,this.#u))&&this.#O();let i=this.#T();n&&(this.#u!==r||(0,u.Eh)(this.options.enabled,this.#u)!==(0,u.Eh)(t.enabled,this.#u)||i!==this.#g)&&this.#A(i)}getOptimisticResult(e){var t,r;let n=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(n,e);return t=this,r=i,(0,u.f8)(t.getCurrentResult(),r)||(this.#t=i,this.#f=this.options,this.#c=this.#u.state),i}getCurrentResult(){return this.#t}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),Reflect.get(e,r))})}trackProp(e){this.#b.add(e)}getCurrentQuery(){return this.#u}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#v({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#t))}#v(e){this.#S();let t=this.#u.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u.lQ)),t}#O(){this.#E();let e=(0,u.d2)(this.options.staleTime,this.#u);if(u.S$||this.#t.isStale||!(0,u.gn)(e))return;let t=(0,u.j3)(this.#t.dataUpdatedAt,e);this.#y=setTimeout(()=>{this.#t.isStale||this.updateResult()},t+1)}#T(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#u):this.options.refetchInterval)??!1}#A(e){this.#R(),this.#g=e,!u.S$&&!1!==(0,u.Eh)(this.options.enabled,this.#u)&&(0,u.gn)(this.#g)&&0!==this.#g&&(this.#m=setInterval(()=>{(this.options.refetchIntervalInBackground||n.m.isFocused())&&this.#v()},this.#g))}#w(){this.#O(),this.#A(this.#T())}#E(){this.#y&&(clearTimeout(this.#y),this.#y=void 0)}#R(){this.#m&&(clearInterval(this.#m),this.#m=void 0)}createResult(e,t){let r,n=this.#u,i=this.options,s=this.#t,l=this.#c,f=this.#f,d=e!==n?e.state:this.#l,{state:y}=e,m={...y},g=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&c(e,t),a=r&&h(e,n,t,i);(s||a)&&(m={...m,...(0,o.k)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:w}=m;r=m.data;let E=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===w){let e;s?.isPlaceholderData&&t.placeholderData===f?.placeholderData?(e=s.data,E=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,void 0!==e&&(w="success",r=(0,u.pl)(s?.data,e,t),g=!0)}if(t.select&&void 0!==r&&!E)if(s&&r===l?.data&&t.select===this.#h)r=this.#p;else try{this.#h=t.select,r=t.select(r),r=(0,u.pl)(s?.data,r,t),this.#p=r,this.#s=null}catch(e){this.#s=e}this.#s&&(b=this.#s,r=this.#p,v=Date.now(),w="error");let R="fetching"===m.fetchStatus,S="pending"===w,O="error"===w,T=S&&R,A=void 0!==r,x={status:w,fetchStatus:m.fetchStatus,isPending:S,isSuccess:"success"===w,isError:O,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:m.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!S,isLoadingError:O&&!A,isPaused:"paused"===m.fetchStatus,isPlaceholderData:g,isRefetchError:O&&A,isStale:p(e,t),refetch:this.refetch,promise:this.#a,isEnabled:!1!==(0,u.Eh)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===x.status?e.reject(x.error):void 0!==x.data&&e.resolve(x.data)},r=()=>{t(this.#a=x.promise=(0,a.T)())},i=this.#a;switch(i.status){case"pending":e.queryHash===n.queryHash&&t(i);break;case"fulfilled":("error"===x.status||x.data!==i.value)&&r();break;case"rejected":("error"!==x.status||x.error!==i.reason)&&r()}}return x}updateResult(){let e=this.#t,t=this.createResult(this.#u,this.options);this.#c=this.#u.state,this.#f=this.options,void 0!==this.#c.data&&(this.#d=this.#u),(0,u.f8)(t,e)||(this.#t=t,this.#o({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#b.size)return!0;let n=new Set(r??this.#b);return this.options.throwOnError&&n.add("error"),Object.keys(this.#t).some(t=>this.#t[t]!==e[t]&&n.has(t))})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#u)return;let t=this.#u;this.#u=e,this.#l=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#w()}#o(e){i.jG.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#t)}),this.#e.getQueryCache().notify({query:this.#u,type:"observerResultsUpdated"})})}};function c(e,t){return!1!==(0,u.Eh)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&f(e,t,t.refetchOnMount)}function f(e,t,r){if(!1!==(0,u.Eh)(t.enabled,e)&&"static"!==(0,u.d2)(t.staleTime,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&p(e,t)}return!1}function h(e,t,r,n){return(e!==t||!1===(0,u.Eh)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,u.Eh)(t.enabled,e)&&e.isStaleByTime((0,u.d2)(t.staleTime,e))}var d=r(4232),y=r(7768);r(7876);var m=d.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),g=d.createContext(!1);g.Provider;var b=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function v(e,t){return function(e,t,r){let n=d.useContext(g),o=d.useContext(m),s=(0,y.jE)(r),a=s.defaultQueryOptions(e);if(s.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=n?"isRestoring":"optimistic",a.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=a.staleTime;a.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof a.gcTime&&(a.gcTime=Math.max(a.gcTime,1e3))}(a.suspense||a.throwOnError||a.experimental_prefetchInRender)&&!o.isReset()&&(a.retryOnMount=!1),d.useEffect(()=>{o.clearReset()},[o]);let l=!s.getQueryCache().get(a.queryHash),[c]=d.useState(()=>new t(s,a)),f=c.getOptimisticResult(a),h=!n&&!1!==e.subscribed;if(d.useSyncExternalStore(d.useCallback(e=>{let t=h?c.subscribe(i.jG.batchCalls(e)):u.lQ;return c.updateResult(),t},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d.useEffect(()=>{c.setOptions(a)},[a,c]),a?.suspense&&f.isPending)throw b(a,c,o);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&void 0===e.data||(0,u.GU)(r,[e.error,n])))({result:f,errorResetBoundary:o,throwOnError:a.throwOnError,query:s.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw f.error;if(s.getDefaultOptions().queries?._experimental_afterQuery?.(a,f),a.experimental_prefetchInRender&&!u.S$&&f.isLoading&&f.isFetching&&!n){let e=l?b(a,c,o):s.getQueryCache().get(a.queryHash)?.promise;e?.catch(u.lQ).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?f:c.trackResult(f)}(e,l,t)}},8220:e=>{!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=u(e),s=o[0],a=o[1],l=new i((s+a)*3/4-a),c=0,f=a>0?s-4:s;for(r=0;r>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[c++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(e,t,r){"use strict";var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);var o=0|p(n,i),u=s(o),l=u.write(n,i);return l!==o&&(u=u.slice(0,l)),u}if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return x(e).length;default:if(i)return n?-1:T(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,t,r){var i,o,s,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return g(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,u/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;hr&&(e+=" ... "),""},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,u=Math.min(o,s),l=this.slice(n,i),c=e.slice(t,r),f=0;f239?4:l>223?3:l>191?2:1;if(i+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:(192&(o=e[i+1]))==128&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],s=e[i+2],(192&o)==128&&(192&s)==128&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}var h=n,p=h.length;if(p<=4096)return String.fromCharCode.apply(String,h);for(var d="",y=0;yr)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,i,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function E(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function R(e,t,r,n,o){return t*=1,r>>>=0,o||E(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function S(e,t,r,n,o){return t*=1,r>>>=0,o||E(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,u,l,c,f,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,f);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||v(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||v(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return(e>>>=0,t||v(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||v(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return S(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return S(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function A(e){for(var t=[],r=0;r=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var B=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=l}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,l=8*o-i-1,c=(1<>1,h=5960464477539062e-23*(23===i),p=n?0:o-1,d=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,l-=8);e[r+p-d]|=128*y}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete r[e]}return o.exports}n.ab="//",e.exports=n(72)}()},8307:(e,t,r)=>{"use strict";r.d(t,{$P:()=>f,C5:()=>v,Zp:()=>y,jb:()=>u,x$:()=>m,zy:()=>p});var n,i=r(4232),o=r(8116);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t{f.current=!0}),i.useCallback(function(e,t){void 0===t&&(t={}),f.current&&("number"==typeof e?u.navigate(e):u.navigate(e,s({fromRouteId:l},t)))},[u,l])}():function(){h()||(0,o.Oi)(!1);let e=i.useContext(a),{basename:t,future:r,navigator:n}=i.useContext(u),{matches:s}=i.useContext(c),{pathname:l}=p(),f=JSON.stringify((0,o.yD)(s,r.v7_relativeSplatPath)),y=i.useRef(!1);return d(()=>{y.current=!0}),i.useCallback(function(r,i){if(void 0===i&&(i={}),!y.current)return;if("number"==typeof r)return void n.go(r);let s=(0,o.Gh)(r,JSON.parse(f),l,"path"===i.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:(0,o.HS)([t,s.pathname])),(i.replace?n.replace:n.push)(s,i.state,i)},[t,n,f,l,e])}()}function m(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=i.useContext(u),{matches:s}=i.useContext(c),{pathname:a}=p(),l=JSON.stringify((0,o.yD)(s,n.v7_relativeSplatPath));return i.useMemo(()=>(0,o.Gh)(e,JSON.parse(l),a,"path"===r),[e,l,a,r])}i.Component;var g=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(g||{}),b=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(b||{});function v(e){let{to:t,replace:r,state:n,relative:s}=e;h()||(0,o.Oi)(!1);let{future:a,static:l}=i.useContext(u),{matches:f}=i.useContext(c),{pathname:d}=p(),m=y(),g=JSON.stringify((0,o.Gh)(t,(0,o.yD)(f,a.v7_relativeSplatPath),d,"path"===s));return i.useEffect(()=>m(JSON.parse(g),{replace:r,state:n,relative:s}),[m,g,s,r,n]),null}(n||(n=r.t(i,2))).startTransition;var w=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(w||{});new Promise(()=>{}),i.Component},8990:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var n=r(4232),i=r(5364);function o(){return"development"===function(){return"production"}()}function s(e){(0,n.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(t.current)e.route&&t.current(e.route);else{let r=function(e={}){var t;if("undefined"==typeof window||null===e.route)return null;window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)});let r=e.scriptSrc?e.scriptSrc:o()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?`${e.basePath}/speed-insights/script.js`:"/_vercel/speed-insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let n=document.createElement("script");return n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.2.0",e.sampleRate&&(n.dataset.sampleRate=e.sampleRate.toString()),e.route&&(n.dataset.route=e.route),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/speed-insights/vitals`),e.dsn&&(n.dataset.dsn=e.dsn),o()&&!1===e.debug&&(n.dataset.debug="false"),n.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${r}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(n),{setRoute:e=>{n.dataset.route=e??void 0}}}({framework:e.framework??"react",basePath:e.basePath??function(){if(void 0!==i&&void 0!==i.env)return i.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});r&&(t.current=r.setRoute)}},[e.route]),null}},9099:(e,t,r)=>{e.exports=r(8253)}}]); \ No newline at end of file diff --git a/.next/static/chunks/5330eab6.0e905b95dc8a5a19.js b/.next/static/chunks/5330eab6.0e905b95dc8a5a19.js new file mode 100644 index 0000000..2ef713e --- /dev/null +++ b/.next/static/chunks/5330eab6.0e905b95dc8a5a19.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[796],{8116:(t,e,a)=>{var n,r;function i(){return(i=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function o(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function u(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field [")+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function p(t,e){let a=t.filter((t,e)=>0===e||t.route.path&&t.route.path.length>0);return e?a.map((t,e)=>e===a.length-1?t.pathname:t.pathnameBase):a.map(t=>t.pathnameBase)}function c(t,e,a,n){let r,h;void 0===n&&(n=!1),"string"==typeof t?r=l(t):(s(!(r=i({},t)).pathname||!r.pathname.includes("?"),u("?","pathname","search",r)),s(!r.pathname||!r.pathname.includes("#"),u("#","pathname","hash",r)),s(!r.search||!r.search.includes("#"),u("#","search","hash",r)));let o=""===t||""===r.pathname,p=o?"/":r.pathname;if(null==p)h=a;else{let t=e.length-1;if(!n&&p.startsWith("..")){let e=p.split("/");for(;".."===e[0];)e.shift(),t-=1;r.pathname=e.join("/")}h=t>=0?e[t]:"/"}let c=function(t,e){var a;let n;void 0===e&&(e="/");let{pathname:r,search:i="",hash:s=""}="string"==typeof t?l(t):t;return{pathname:r?r.startsWith("/")?r:(a=r,n=e.replace(/\/+$/,"").split("/"),a.split("/").forEach(t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)}),n.length>1?n.join("/"):"/"):e,search:d(i),hash:m(s)}}(r,h),f=p&&"/"!==p&&p.endsWith("/"),g=(o||"."===p)&&a.endsWith("/");return!c.pathname.endsWith("/")&&(f||g)&&(c.pathname+="/"),c}a.d(e,{AO:()=>h,Gh:()=>c,HS:()=>f,Oi:()=>s,pb:()=>o,tH:()=>g,yD:()=>p}),function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(n||(n={})),function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(r||(r={}));let f=t=>t.join("/").replace(/\/\/+/g,"/"),d=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",m=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";class g extends Error{}Symbol("deferred")}}]); \ No newline at end of file diff --git a/.next/static/chunks/639.879f3c63a68ab0ec.js b/.next/static/chunks/639.879f3c63a68ab0ec.js new file mode 100644 index 0000000..ade26fa --- /dev/null +++ b/.next/static/chunks/639.879f3c63a68ab0ec.js @@ -0,0 +1,8 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[639],{9639:(e,a,r)=>{r.r(a),r.d(a,{default:()=>ep});var t=r(7876),s=r(4232),n=r(9099),l=r(973),i=r(8990),c=r(4403);let o=(0,s.createContext)(void 0),d=e=>{let{children:a}=e,[r,n]=(0,s.useState)(()=>localStorage.getItem("tcg-vault-theme")||"system"),[l,i]=(0,s.useState)("light");return(0,s.useEffect)(()=>{let e=()=>{"system"===r?i(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):i(r)};e();let a=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{"system"===r&&e()};return a.addEventListener("change",t),()=>a.removeEventListener("change",t)},[r]),(0,s.useEffect)(()=>{let e=document.documentElement;"dark"===l?e.classList.add("dark"):e.classList.remove("dark");let a=document.querySelector('meta[name="theme-color"]');a&&a.setAttribute("content","dark"===l?"#0f172a":"#8b5cf6"),localStorage.setItem("tcg-vault-theme",r)},[r,l]),(0,t.jsx)(o.Provider,{value:{theme:r,effectiveTheme:l,setTheme:e=>{n(e)},toggleTheme:()=>{"light"===r?n("dark"):"dark"===r?n("system"):n("light")}},children:a})};var m=r(8307),u=r(4952);let x=e=>{let{children:a}=e,{user:r,logout:n,isAdmin:l}=(0,c.A)(),{toggleTheme:i,effectiveTheme:d}=(()=>{let e=(0,s.useContext)(o);if(void 0===e)throw Error("useTheme must be used within a ThemeProvider");return e})(),x=(0,m.zy)(),h=(0,m.Zp)(),[g,p]=(0,s.useState)(!1),[f,b]=(0,s.useState)(!1),v=()=>{n(),p(!1),b(!1),h("/login")},j=[{name:"Dashboard",href:"/dashboard",icon:"\uD83D\uDCCA",mobileIcon:"\uD83C\uDFE0"},{name:"Cards",href:"/cards",icon:"\uD83C\uDCCF",mobileIcon:"\uD83C\uDCCF"},{name:"Collections",href:"/collections",icon:"\uD83D\uDCDA",mobileIcon:"\uD83D\uDCDA"},{name:"Decks",href:"/decks",icon:"\uD83C\uDFAF",mobileIcon:"\uD83C\uDFAF"},{name:"Scanner",href:"/scanner",icon:"\uD83D\uDCF7",mobileIcon:"\uD83D\uDCF7"}];return(0,t.jsxs)("div",{className:"min-h-screen bg-surface-50 dark:bg-surface-900 transition-colors",children:[(0,t.jsxs)("div",{className:"hidden lg:flex h-screen",children:[(0,t.jsxs)("div",{className:"w-64 bg-white dark:bg-surface-800 border-r border-surface-200 dark:border-surface-700 flex flex-col",children:[(0,t.jsx)("div",{className:"p-6 border-b border-surface-200 dark:border-surface-700",children:(0,t.jsxs)(u.N_,{to:"/dashboard",className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"bg-gradient-to-r from-primary-500 to-accent-500 text-white p-3 rounded-xl",children:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"TCG Vault"}),(0,t.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:["Hi, ",r?.firstName||r?.username]})]})]})}),(0,t.jsx)("nav",{className:"flex-1 p-4 space-y-2",children:j.map(e=>{let a;return(0,t.jsxs)(u.N_,{to:e.href,className:`flex items-center space-x-3 px-4 py-3 rounded-xl text-sm font-medium transition-all duration-200 ${(a=e.href,x.pathname===a)?"bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white hover:bg-surface-100 dark:hover:bg-surface-700"}`,children:[(0,t.jsx)("span",{className:"text-lg",children:e.icon}),(0,t.jsx)("span",{children:e.name})]},e.name)})}),(0,t.jsxs)("div",{className:"p-4 border-t border-surface-200 dark:border-surface-700",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 rounded-xl bg-surface-50 dark:bg-surface-700",children:[(0,t.jsx)("div",{className:"w-10 h-10 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold",children:r?.firstName?.[0]||r?.username?.[0]?.toUpperCase()||"U"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-surface-900 dark:text-white truncate",children:r?.firstName&&r?.lastName?`${r.firstName} ${r.lastName}`:r?.username}),(0,t.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 truncate",children:r?.email})]}),(0,t.jsx)("button",{onClick:()=>p(!g),className:"p-1 rounded-lg hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-surface-600 dark:text-surface-400",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),g&&(0,t.jsx)("div",{className:"absolute bottom-20 left-4 w-56 bg-white dark:bg-surface-800 rounded-xl shadow-lg ring-1 ring-black ring-opacity-5 border border-surface-200 dark:border-surface-700",children:(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsxs)(u.N_,{to:"/settings",onClick:()=>p(!1),className:"flex items-center space-x-3 px-4 py-2 text-sm text-surface-700 dark:text-surface-300 hover:bg-surface-100 dark:hover:bg-surface-700",children:[(0,t.jsx)("span",{children:"⚙️"}),(0,t.jsx)("span",{children:"Settings"})]}),l()&&(0,t.jsxs)(u.N_,{to:"/admin",onClick:()=>p(!1),className:"flex items-center space-x-3 px-4 py-2 text-sm text-yellow-700 dark:text-yellow-300 hover:bg-yellow-50 dark:hover:bg-yellow-900/20",children:[(0,t.jsx)("span",{children:"\uD83D\uDC51"}),(0,t.jsx)("span",{children:"Admin Panel"})]}),(0,t.jsx)("div",{className:"border-t border-surface-200 dark:border-surface-700 my-1"}),(0,t.jsxs)("button",{onClick:v,className:"flex items-center space-x-3 px-4 py-2 text-sm text-red-700 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 w-full text-left",children:[(0,t.jsx)("span",{children:"\uD83D\uDEAA"}),(0,t.jsx)("span",{children:"Sign Out"})]})]})})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)("header",{className:"bg-white dark:bg-surface-800 border-b border-surface-200 dark:border-surface-700 px-6 py-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:j.find(e=>{let a;return a=e.href,x.pathname===a})?.name||"TCG Vault"}),l()&&(0,t.jsx)("span",{className:"px-3 py-1 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 text-xs font-medium rounded-full",children:"⚡ Admin"})]}),(0,t.jsx)("div",{className:"flex items-center space-x-3",children:(0,t.jsx)("button",{onClick:i,className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-700 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:"dark"===d?(0,t.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",clipRule:"evenodd"})}):(0,t.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})})})})]})}),(0,t.jsx)("main",{className:"flex-1 overflow-auto p-6",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto",children:a})})]})]}),(0,t.jsxs)("div",{className:"lg:hidden",children:[(0,t.jsx)("header",{className:"fixed top-0 left-0 right-0 z-40 bg-white dark:bg-surface-900 border-b border-surface-200 dark:border-surface-700 px-4 py-3 safe-area-inset-top",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("button",{onClick:()=>b(!f),className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-800 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),(0,t.jsx)("div",{className:"bg-gradient-to-r from-primary-500 to-accent-500 text-white p-2 rounded-xl",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-lg font-bold text-surface-900 dark:text-white",children:"TCG Vault"}),(0,t.jsxs)("p",{className:"text-xs text-surface-600 dark:text-surface-400",children:["Hi, ",r?.firstName||r?.username]})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("button",{onClick:i,className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-800 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors",children:"dark"===d?(0,t.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",clipRule:"evenodd"})}):(0,t.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})})}),(0,t.jsxs)("button",{onClick:()=>p(!0),className:"relative p-1",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold text-sm",children:r?.firstName?.[0]||r?.username?.[0]?.toUpperCase()||"U"}),l()&&(0,t.jsx)("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-yellow-400 rounded-full border border-white dark:border-surface-900"})]})]})]})}),f&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 lg:hidden",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50",onClick:()=>b(!1)}),(0,t.jsxs)("div",{className:"fixed left-0 top-0 bottom-0 w-64 bg-white dark:bg-surface-800 border-r border-surface-200 dark:border-surface-700 transform transition-transform duration-300 ease-in-out",children:[(0,t.jsx)("div",{className:"p-6 border-b border-surface-200 dark:border-surface-700",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(u.N_,{to:"/dashboard",className:"flex items-center space-x-3",onClick:()=>b(!1),children:[(0,t.jsx)("div",{className:"bg-gradient-to-r from-primary-500 to-accent-500 text-white p-3 rounded-xl",children:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"TCG Vault"}),(0,t.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:["Hi, ",r?.firstName||r?.username]})]})]}),(0,t.jsx)("button",{onClick:()=>b(!1),className:"p-2 rounded-xl bg-surface-100 dark:bg-surface-800 text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,t.jsx)("nav",{className:"flex-1 p-4 space-y-2",children:j.map(e=>{let a;return(0,t.jsxs)(u.N_,{to:e.href,onClick:()=>b(!1),className:`flex items-center space-x-3 px-4 py-3 rounded-xl text-sm font-medium transition-all duration-200 ${(a=e.href,x.pathname===a)?"bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white hover:bg-surface-100 dark:hover:bg-surface-700"}`,children:[(0,t.jsx)("span",{className:"text-lg",children:e.icon}),(0,t.jsx)("span",{children:e.name})]},e.name)})}),(0,t.jsx)("div",{className:"p-4 border-t border-surface-200 dark:border-surface-700",children:(0,t.jsxs)("div",{className:"flex items-center space-x-3 p-3 rounded-xl bg-surface-50 dark:bg-surface-700",children:[(0,t.jsx)("div",{className:"w-10 h-10 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold",children:r?.firstName?.[0]||r?.username?.[0]?.toUpperCase()||"U"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-surface-900 dark:text-white truncate",children:r?.firstName&&r?.lastName?`${r.firstName} ${r.lastName}`:r?.username}),(0,t.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 truncate",children:r?.email})]})]})})]})]}),(0,t.jsx)("nav",{className:"fixed bottom-0 left-0 right-0 z-50 bg-white dark:bg-surface-900 border-t border-surface-200 dark:border-surface-700 safe-area-inset-bottom",children:(0,t.jsxs)("div",{className:"relative flex items-end justify-around px-4 py-2",children:[(0,t.jsxs)(u.N_,{to:"/dashboard",className:`flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 ${"/dashboard"===x.pathname?"text-primary-600 dark:text-primary-400":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:[(0,t.jsx)("div",{className:"mb-1",children:"/dashboard"===x.pathname?(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"})}):(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Home"})]}),(0,t.jsxs)(u.N_,{to:"/cards",className:`flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 ${"/cards"===x.pathname?"text-primary-600 dark:text-primary-400":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:[(0,t.jsx)("div",{className:"mb-1",children:"/cards"===x.pathname?(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}):(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Cards"})]}),(0,t.jsxs)(u.N_,{to:"/scanner",className:"relative flex flex-col items-center justify-center -mt-6 mb-2",children:[(0,t.jsx)("div",{className:`w-14 h-14 rounded-full shadow-lg transition-all duration-200 flex items-center justify-center ${"/scanner"===x.pathname?"bg-gradient-to-r from-primary-600 to-accent-600 shadow-primary-500/25 shadow-xl":"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 shadow-primary-500/20 hover:shadow-xl"}`,children:(0,t.jsxs)("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,t.jsx)("span",{className:"text-xs font-medium text-primary-600 dark:text-primary-400 mt-1",children:"Scanner"})]}),(0,t.jsxs)(u.N_,{to:"/collections",className:`flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 ${"/collections"===x.pathname?"text-primary-600 dark:text-primary-400":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:[(0,t.jsx)("div",{className:"mb-1",children:"/collections"===x.pathname?(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h3a1 1 0 110 2h-1v10a2 2 0 01-2 2H7a2 2 0 01-2-2V6H4a1 1 0 010-2h3zM9 4h6V3H9v1zm8 2H7v10h10V6z"})}):(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Collections"})]}),(0,t.jsxs)("button",{onClick:()=>p(!0),className:"flex flex-col items-center justify-center p-2 rounded-xl transition-all duration-200 text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white",children:[(0,t.jsx)("div",{className:"mb-1",children:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"More"})]})]})}),(0,t.jsx)("main",{className:"pt-16 pb-20 px-4 max-w-md mx-auto",children:(0,t.jsx)("div",{className:"animate-fade-in",children:a})}),g&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:()=>p(!1),children:(0,t.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl p-6 safe-area-inset-bottom animate-slide-up",children:[(0,t.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,t.jsxs)("div",{className:"flex items-center space-x-4 mb-6 p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center text-white font-semibold text-lg",children:r?.firstName?.[0]||r?.username?.[0]?.toUpperCase()||"U"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-semibold text-surface-900 dark:text-white",children:r?.firstName&&r?.lastName?`${r.firstName} ${r.lastName}`:r?.username}),(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:r?.email}),(0,t.jsx)("div",{className:"flex gap-1 mt-1",children:r?.roles.map(e=>(0,t.jsx)("span",{className:`px-2 py-0.5 rounded-full text-xs font-medium ${"admin"===e?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-200"}`,children:e},e))})]})]}),(0,t.jsxs)("div",{className:"space-y-2 mb-6",children:[(0,t.jsxs)(u.N_,{to:"/decks",onClick:()=>p(!1),className:"flex items-center space-x-3 p-3 rounded-xl hover:bg-surface-100 dark:hover:bg-surface-800 transition-colors",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-surface-600 dark:text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),(0,t.jsx)("span",{className:"text-surface-900 dark:text-white font-medium",children:"Decks"})]}),(0,t.jsxs)(u.N_,{to:"/settings",onClick:()=>p(!1),className:"flex items-center space-x-3 p-3 rounded-xl hover:bg-surface-100 dark:hover:bg-surface-800 transition-colors",children:[(0,t.jsxs)("svg",{className:"w-5 h-5 text-surface-600 dark:text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),(0,t.jsx)("span",{className:"text-surface-900 dark:text-white font-medium",children:"Settings"})]}),l()&&(0,t.jsxs)(u.N_,{to:"/admin",onClick:()=>p(!1),className:"flex items-center space-x-3 p-3 rounded-xl hover:bg-yellow-50 dark:hover:bg-yellow-900/20 transition-colors",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-yellow-600 dark:text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),(0,t.jsx)("span",{className:"text-yellow-700 dark:text-yellow-300 font-medium",children:"Admin Panel"})]})]}),(0,t.jsxs)("button",{onClick:v,className:"w-full flex items-center justify-center space-x-2 p-3 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 rounded-xl hover:bg-red-100 dark:hover:bg-red-900/30 transition-colors font-medium",children:[(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})}),(0,t.jsx)("span",{children:"Sign Out"})]})]})})]}),(g||f)&&(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>{p(!1),b(!1)}})]})},h=()=>{let{user:e}=(0,c.A)(),a=[{title:"Collections",value:"0",icon:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),color:"primary"},{title:"Decks",value:"0",icon:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),color:"accent"},{title:"Total Cards",value:"0",icon:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2M7 4H5a2 2 0 00-2 2v10a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2h-2M7 4v6l2-2 2 2V4"})}),color:"primary"},{title:"Total Value",value:"$0",icon:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1"})}),color:"accent"}],r=[{title:"Scan Cards",description:"Use OCR to quickly add cards",href:"/scanner",icon:(0,t.jsxs)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})]}),gradient:"from-primary-500 to-accent-500"},{title:"Browse Cards",description:"Explore your collection",href:"/cards",icon:(0,t.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),gradient:"from-accent-500 to-primary-500"},{title:"Manage Collections",description:"Organize your cards",href:"/collections",icon:(0,t.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})}),gradient:"from-primary-600 to-accent-400"}];return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-br from-primary-500 via-primary-600 to-accent-500 p-6 rounded-2xl text-white shadow-lg",children:[(0,t.jsxs)("h1",{className:"text-2xl font-bold mb-2",children:["Welcome back, ",e?.firstName||e?.username,"! \uD83D\uDC4B"]}),(0,t.jsx)("p",{className:"text-primary-100",children:"Ready to manage your card collection?"})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-4",children:a.map((e,a)=>(0,t.jsxs)("div",{className:"bg-white dark:bg-surface-800 p-4 rounded-xl shadow-sm border border-surface-200 dark:border-surface-700 transition-colors",children:[(0,t.jsx)("div",{className:`inline-flex items-center justify-center w-10 h-10 rounded-lg mb-3 ${"primary"===e.color?"bg-primary-100 text-primary-600 dark:bg-primary-900/30 dark:text-primary-400":"bg-accent-100 text-accent-600 dark:bg-accent-900/30 dark:text-accent-400"}`,children:e.icon}),(0,t.jsx)("p",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:e.value}),(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:e.title})]},e.title))}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-surface-900 dark:text-white",children:"Quick Actions"}),r.map((e,a)=>(0,t.jsx)(u.N_,{to:e.href,className:"block bg-white dark:bg-surface-800 p-4 rounded-xl shadow-sm border border-surface-200 dark:border-surface-700 hover:shadow-md transition-all duration-200 active:scale-98",children:(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)("div",{className:`w-12 h-12 bg-gradient-to-r ${e.gradient} rounded-xl flex items-center justify-center text-white shadow-md`,children:e.icon}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:e.title}),(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:e.description})]}),(0,t.jsx)("svg",{className:"w-5 h-5 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},e.title))]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-surface-900 dark:text-white",children:"Recent Activity"}),(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 p-6 rounded-xl shadow-sm border border-surface-200 dark:border-surface-700 transition-colors",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-4",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-4",children:"No recent activity yet"}),(0,t.jsx)("p",{className:"text-sm text-surface-500 dark:text-surface-500",children:"Start by scanning some cards or creating a collection!"})]})})]})]})};var g=r(7768),p=r(7914),f=r(97),b=r(1040);let v=r(5364).env.REACT_APP_API_URL||"https://tcg-vault.vercel.app",j=b.A.create({baseURL:v,timeout:1e4,headers:{"Content-Type":"application/json"}});j.interceptors.request.use(e=>{let a=localStorage.getItem("tcg-vault-token");return a&&(e.headers.Authorization=`Bearer ${a}`),e}),j.interceptors.response.use(e=>e,e=>(e.response?.status===401&&(localStorage.removeItem("tcg-vault-token"),window.location.href="/login"),Promise.reject(e)));let y={cards:{getAllCards:async e=>(await j.get("/api/cards",{params:e})).data.data,getCard:async e=>(await j.get(`/api/cards/${e}`)).data.data,searchCards:async(e,a)=>(await j.get("/api/cards/search",{params:{q:e,...a}})).data.data,getUserCards:async e=>(await j.get("/api/user-cards",{params:e})).data.data,getUserCard:async e=>(await j.get(`/api/user-cards/${e}`)).data.data,addCard:async e=>(await j.post("/api/user-cards",e)).data.data,updateCard:async(e,a)=>(await j.put(`/api/user-cards/${e}`,a)).data.data,deleteCard:async e=>{await j.delete(`/api/user-cards/${e}`)},bulkAddCards:async e=>(await j.post("/api/user-cards/bulk",{cards:e})).data.data,bulkUpdateCards:async e=>(await j.put("/api/user-cards/bulk",{updates:e})).data.data,bulkDeleteCards:async e=>{await j.delete("/api/user-cards/bulk",{data:{ids:e}})},moveCardsToCollection:async(e,a)=>{await j.post("/api/user-cards/move-to-collection",{cardIds:e,collectionId:a})},moveCardsToDeck:async(e,a)=>{await j.post("/api/user-cards/move-to-deck",{cardIds:e,deckId:a})}},collections:{getCollections:async e=>(await j.get("/api/collections",{params:e})).data.data,getCollection:async function(e){let a=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(await j.get(`/api/collections/${e}`,{params:{include_cards:a}})).data.data},createCollection:async e=>(await j.post("/api/collections",e)).data.data,updateCollection:async(e,a)=>(await j.put(`/api/collections/${e}`,a)).data.data,deleteCollection:async e=>{await j.delete(`/api/collections/${e}`)},addCardsToCollection:async(e,a)=>{await j.post(`/api/collections/${e}/cards`,{cardIds:a})},removeCardsFromCollection:async(e,a)=>{await j.delete(`/api/collections/${e}/cards`,{data:{cardIds:a}})},getCollectionStats:async e=>(await j.get(`/api/collections/${e}/stats`)).data.data,duplicateCollection:async(e,a)=>(await j.post(`/api/collections/${e}/duplicate`,{name:a})).data.data,exportCollection:async(e,a)=>(await j.get(`/api/collections/${e}/export`,{params:{format:a},responseType:"blob"})).data},decks:{getDecks:async e=>(await j.get("/api/decks",{params:e})).data.data,getDeck:async e=>(await j.get(`/api/decks/${e}`)).data.data,createDeck:async e=>(await j.post("/api/decks",e)).data.data,updateDeck:async(e,a)=>(await j.put(`/api/decks/${e}`,a)).data.data,deleteDeck:async e=>{await j.delete(`/api/decks/${e}`)},addCardToDeck:async function(e,a,r){let t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"mainboard";await j.post(`/api/decks/${e}/cards`,{cardId:a,quantity:r,board:t})},updateDeckCard:async function(e,a,r){let t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"mainboard";await j.put(`/api/decks/${e}/cards/${a}`,{quantity:r,board:t})},removeDeckCard:async(e,a)=>{await j.delete(`/api/decks/${e}/cards/${a}`)},validateDeck:async e=>(await j.get(`/api/decks/${e}/validate`)).data.data,getDeckStats:async e=>(await j.get(`/api/decks/${e}/stats`)).data.data,importDeck:async e=>(await j.post("/api/decks/import",e)).data.data,exportDeck:async(e,a)=>(await j.get(`/api/decks/${e}/export`,{params:{format:a}})).data.data,duplicateDeck:async(e,a)=>(await j.post(`/api/decks/${e}/duplicate`,{name:a})).data.data},tags:{getTags:async()=>(await j.get("/api/tags")).data.data,createTag:async e=>(await j.post("/api/tags",e)).data.data,updateTag:async(e,a)=>(await j.put(`/api/tags/${e}`,a)).data.data,deleteTag:async e=>{await j.delete(`/api/tags/${e}`)},getEntitiesByTag:async e=>(await j.get(`/api/tags/${e}/entities`)).data.data}},k=e=>{let{isOpen:a,onClose:r,collectionId:n}=e,l=(0,g.jE)(),[i,c]=(0,s.useState)({name:"",description:"",game:"",tags:[],color:"#8b5cf6",icon:"\uD83D\uDCDA",isPublic:!1}),[o,d]=(0,s.useState)([]),[m,u]=(0,s.useState)(!1),{data:x}=(0,p.I)({queryKey:["collection",n],queryFn:()=>y.collections.getCollection(n,!1),enabled:!!n}),{data:h=[]}=(0,p.I)({queryKey:["tags"],queryFn:()=>y.tags.getTags()}),b=(0,f.n)({mutationFn:y.collections.createCollection,onSuccess:()=>{l.invalidateQueries({queryKey:["collections"]}),r()}}),v=(0,f.n)({mutationFn:e=>{let{id:a,data:r}=e;return y.collections.updateCollection(a,r)},onSuccess:()=>{l.invalidateQueries({queryKey:["collections"]}),l.invalidateQueries({queryKey:["collection",n]}),r()}});(0,s.useEffect)(()=>{x&&(c({name:x.name,description:x.description||"",game:x.game||"",tags:x.tags,color:x.color||"#8b5cf6",icon:x.icon||"\uD83D\uDCDA",isPublic:x.isPublic}),d(x.tags))},[x]);let j=async e=>{e.preventDefault();let a={...i,tags:o};n&&x?v.mutate({id:n,data:a}):b.mutate(a)};return a?(0,t.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:r,children:(0,t.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl max-h-[90vh] overflow-hidden animate-slide-up",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:n?"Edit Collection":"New Collection"}),(0,t.jsx)("button",{onClick:r,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("div",{className:"max-h-[calc(90vh-8rem)] overflow-y-auto",children:(0,t.jsxs)("form",{onSubmit:j,className:"space-y-6",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("div",{className:"p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:i.color},children:i.icon}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:i.name||"Collection Name"}),i.description&&(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:i.description}),i.game&&(0,t.jsx)("span",{className:`inline-block mt-2 px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(i.game)}`,children:i.game})]})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Collection Name *"}),(0,t.jsx)("input",{type:"text",value:i.name,onChange:e=>c(a=>({...a,name:e.target.value})),placeholder:"Enter collection name...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",required:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Description"}),(0,t.jsx)("textarea",{value:i.description,onChange:e=>c(a=>({...a,description:e.target.value})),rows:3,placeholder:"Describe your collection...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors resize-none"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Game (Optional)"}),(0,t.jsxs)("select",{value:i.game,onChange:e=>c(a=>({...a,game:e.target.value})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,t.jsx)("option",{value:"",children:"All Games"}),(0,t.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,t.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,t.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,t.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"}),(0,t.jsx)("option",{value:"OTHER",children:"Other"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Icon"}),(0,t.jsx)("button",{type:"button",onClick:()=>u(!m),className:"w-full p-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl flex items-center justify-center text-2xl hover:bg-surface-100 dark:hover:bg-surface-600 transition-colors",children:i.icon}),m&&(0,t.jsx)("div",{className:"mt-2 p-3 bg-white dark:bg-surface-800 border border-surface-200 dark:border-surface-700 rounded-xl",children:(0,t.jsx)("div",{className:"grid grid-cols-5 gap-2",children:["\uD83D\uDCDA","\uD83C\uDFB4","⚡","\uD83D\uDD25","\uD83D\uDCA7","\uD83C\uDF3F","⚫","\uD83D\uDFE4","\uD83D\uDFE1","\uD83D\uDD34","\uD83D\uDFE2","\uD83D\uDD35","\uD83D\uDFE3","⚪","\uD83C\uDF1F","\uD83D\uDC8E","\uD83D\uDC51","\uD83C\uDFC6","\uD83C\uDFAF","\uD83D\uDE80"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{c(a=>({...a,icon:e})),u(!1)},className:`p-2 rounded-lg text-xl hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors ${i.icon===e?"bg-primary-100 dark:bg-primary-900/30":""}`,children:e},e))})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Color"}),(0,t.jsx)("div",{className:"grid grid-cols-5 gap-2",children:["#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#ec4899","#8b5cf6","#6366f1","#06b6d4","#84cc16"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>c(a=>({...a,color:e})),className:`w-full h-10 rounded-lg transition-all ${i.color===e?"ring-2 ring-surface-400 ring-offset-2 dark:ring-offset-surface-900":""}`,style:{backgroundColor:e}},e))})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{d(a=>a.includes(e.id)?a.filter(a=>a!==e.id):[...a,e.id])},className:`px-3 py-2 rounded-full text-sm font-medium transition-colors ${o.includes(e.id)?"text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,style:{backgroundColor:o.includes(e.id)?e.color:void 0},children:e.name},e.id))})]}),(0,t.jsx)("div",{children:(0,t.jsxs)("label",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-surface-700 dark:text-surface-300",children:"Public Collection"}),(0,t.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 mt-1",children:"Allow others to view your collection"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>c(e=>({...e,isPublic:!e.isPublic})),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 ${i.isPublic?"bg-primary-600":"bg-surface-200 dark:bg-surface-700"}`,children:(0,t.jsx)("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${i.isPublic?"translate-x-5":"translate-x-0"}`})})]})}),(0,t.jsx)("button",{type:"submit",disabled:!i.name.trim()||b.isPending||v.isPending,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:b.isPending||v.isPending?(0,t.jsxs)("div",{className:"flex items-center justify-center",children:[(0,t.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),n?"Updating...":"Creating..."]}):n?"Update Collection":"Create Collection"})]})})]})})}):null},w=()=>{let e=(0,g.jE)(),[a,r]=(0,s.useState)(!1),[n,l]=(0,s.useState)(null),[i,c]=(0,s.useState)({search:"",game:"",isFavorite:!1}),[o,d]=(0,s.useState)("grid"),{data:m=[],isLoading:u}=(0,p.I)({queryKey:["collections",i],queryFn:()=>y.collections.getCollections(i)}),x=(0,f.n)({mutationFn:y.collections.deleteCollection,onSuccess:()=>{e.invalidateQueries({queryKey:["collections"]})}}),h=(0,f.n)({mutationFn:e=>{let{id:a,isFavorite:r}=e;return y.collections.updateCollection(a,{isFavorite:r})},onSuccess:()=>{e.invalidateQueries({queryKey:["collections"]})}}),b=m.filter(e=>{let a=!i.search||e.name.toLowerCase().includes(i.search.toLowerCase())||e.description?.toLowerCase().includes(i.search.toLowerCase()),r=!i.game||e.game===i.game,t=!i.isFavorite||e.isFavorite;return a&&r&&t});return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:"Collections"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mt-1",children:"Organize and manage your card collections"})]}),(0,t.jsxs)("button",{onClick:()=>r(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,t.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"New Collection"]})]}),(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,t.jsx)("input",{type:"text",value:i.search,onChange:e=>c(a=>({...a,search:e.target.value})),placeholder:"Search collections...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex space-x-2 overflow-x-auto pb-2",children:[(0,t.jsxs)("select",{value:i.game,onChange:e=>c(a=>({...a,game:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"",children:"All Games"}),(0,t.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,t.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,t.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,t.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"}),(0,t.jsx)("option",{value:"OTHER",children:"Other"})]}),(0,t.jsx)("button",{onClick:()=>c(e=>({...e,isFavorite:!e.isFavorite})),className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${i.isFavorite?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300":"bg-surface-50 dark:bg-surface-700 text-surface-700 dark:text-surface-300 border border-surface-300 dark:border-surface-600"}`,children:"⭐ Favorites"})]}),(0,t.jsxs)("div",{className:"flex bg-surface-100 dark:bg-surface-700 rounded-lg p-1",children:[(0,t.jsx)("button",{onClick:()=>d("grid"),className:`p-2 rounded-md transition-colors ${"grid"===o?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}),(0,t.jsx)("button",{onClick:()=>d("list"),className:`p-2 rounded-md transition-colors ${"list"===o?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})})]})]})]})}),u?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading collections..."})]})}):0===b.length?(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-8",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-surface-900 dark:text-white mb-2",children:0===m.length?"No collections yet":"No matching collections"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:0===m.length?"Create your first collection to start organizing your cards":"Try adjusting your search or filters"}),0===m.length&&(0,t.jsx)("button",{onClick:()=>r(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-6 py-3 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:"Create Collection"})]})}):(0,t.jsx)("div",{className:"grid"===o?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4":"space-y-4",children:b.map(e=>(0,t.jsxs)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-all duration-200 hover:shadow-md",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:e.color||"#8b5cf6"},children:e.icon||"\uD83D\uDCDA"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:e.name}),e.description&&(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 line-clamp-2",children:e.description})]})]}),(0,t.jsx)("button",{onClick:()=>(e=>{h.mutate({id:e.id,isFavorite:!e.isFavorite})})(e),className:`p-2 rounded-lg transition-colors ${e.isFavorite?"text-yellow-500 hover:text-yellow-600":"text-surface-400 hover:text-yellow-500"}`,children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:e.isFavorite?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-surface-600 dark:text-surface-400",children:[(0,t.jsxs)("span",{children:[e.cardCount||0," cards"]}),e.totalValue&&(0,t.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-medium",children:["$",e.totalValue.toFixed(2)]})]}),e.game&&(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(e.game)}`,children:e.game})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{},className:"flex-1 bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 py-2 px-3 rounded-lg text-sm font-medium hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors",children:"View Cards"}),(0,t.jsx)("button",{onClick:()=>l(e.id),className:"p-2 text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 rounded-lg transition-colors",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,t.jsx)("button",{onClick:()=>{var a,r;return a=e.id,r=e.name,void(window.confirm(`Are you sure you want to delete "${r}"? This action cannot be undone.`)&&x.mutate(a))},className:"p-2 text-red-400 hover:text-red-600 rounded-lg transition-colors",disabled:x.isPending,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]},e.id))}),(0,t.jsx)(k,{isOpen:a||!!n,onClose:()=>{r(!1),l(null)},collectionId:n||void 0})]})},N=e=>{let{isOpen:a,onClose:r,deckId:n}=e,l=(0,g.jE)(),[i,c]=(0,s.useState)({name:"",description:"",game:"MTG",format:"",tags:[],color:"#8b5cf6",isPublic:!1}),[o,d]=(0,s.useState)([]),{data:m}=(0,p.I)({queryKey:["deck",n],queryFn:()=>y.decks.getDeck(n),enabled:!!n}),{data:u=[]}=(0,p.I)({queryKey:["tags"],queryFn:()=>y.tags.getTags()}),x=(0,f.n)({mutationFn:y.decks.createDeck,onSuccess:()=>{l.invalidateQueries({queryKey:["decks"]}),r()}}),h=(0,f.n)({mutationFn:e=>{let{id:a,data:r}=e;return y.decks.updateDeck(a,r)},onSuccess:()=>{l.invalidateQueries({queryKey:["decks"]}),l.invalidateQueries({queryKey:["deck",n]}),r()}});(0,s.useEffect)(()=>{m&&(c({name:m.name,description:m.description||"",game:m.game,format:m.format||"",tags:m.tags,color:m.color||"#8b5cf6",isPublic:m.isPublic}),d(m.tags))},[m]);let b=async e=>{e.preventDefault();let a={...i,tags:o};n&&m?h.mutate({id:n,data:a}):x.mutate(a)};return a?(0,t.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:r,children:(0,t.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl max-h-[90vh] overflow-hidden animate-slide-up",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:n?"Edit Deck":"New Deck"}),(0,t.jsx)("button",{onClick:r,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("div",{className:"max-h-[calc(90vh-8rem)] overflow-y-auto",children:(0,t.jsxs)("form",{onSubmit:b,className:"space-y-6",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("div",{className:"p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:i.color},children:"\uD83C\uDFB4"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:i.name||"Deck Name"}),i.description&&(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:i.description}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(i.game)}`,children:i.game}),i.format&&(0,t.jsx)("span",{className:"px-2 py-1 bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 rounded-full text-xs font-medium",children:i.format})]})]})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Deck Name *"}),(0,t.jsx)("input",{type:"text",value:i.name,onChange:e=>c(a=>({...a,name:e.target.value})),placeholder:"Enter deck name...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",required:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Description"}),(0,t.jsx)("textarea",{value:i.description,onChange:e=>c(a=>({...a,description:e.target.value})),rows:3,placeholder:"Describe your deck...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors resize-none"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Game *"}),(0,t.jsxs)("select",{value:i.game,onChange:e=>c(a=>({...a,game:e.target.value,format:""})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,t.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,t.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,t.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,t.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Format"}),(0,t.jsxs)("select",{value:i.format,onChange:e=>c(a=>({...a,format:e.target.value})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,t.jsx)("option",{value:"",children:"Select Format"}),(e=>{switch(e){case"MTG":return[{value:"standard",label:"Standard"},{value:"modern",label:"Modern"},{value:"commander",label:"Commander"},{value:"pioneer",label:"Pioneer"},{value:"legacy",label:"Legacy"},{value:"vintage",label:"Vintage"},{value:"draft",label:"Draft"},{value:"sealed",label:"Sealed"}];case"POKEMON":return[{value:"standard",label:"Standard"},{value:"expanded",label:"Expanded"},{value:"unlimited",label:"Unlimited"}];case"LORCANA":return[{value:"standard",label:"Standard"},{value:"constructed",label:"Constructed"}];case"YUGIOH":return[{value:"advanced",label:"Advanced"},{value:"traditional",label:"Traditional"}];default:return[]}})(i.game).map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Color"}),(0,t.jsx)("div",{className:"grid grid-cols-5 gap-2",children:["#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#ec4899","#6366f1","#06b6d4","#84cc16","#f97316"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>c(a=>({...a,color:e})),className:`w-full h-12 rounded-lg transition-all ${i.color===e?"ring-2 ring-surface-400 ring-offset-2 dark:ring-offset-surface-900":""}`,style:{backgroundColor:e}},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:u.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{d(a=>a.includes(e.id)?a.filter(a=>a!==e.id):[...a,e.id])},className:`px-3 py-2 rounded-full text-sm font-medium transition-colors ${o.includes(e.id)?"text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,style:{backgroundColor:o.includes(e.id)?e.color:void 0},children:e.name},e.id))})]}),(0,t.jsx)("div",{children:(0,t.jsxs)("label",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-surface-700 dark:text-surface-300",children:"Public Deck"}),(0,t.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 mt-1",children:"Allow others to view your deck"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>c(e=>({...e,isPublic:!e.isPublic})),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 ${i.isPublic?"bg-primary-600":"bg-surface-200 dark:bg-surface-700"}`,children:(0,t.jsx)("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${i.isPublic?"translate-x-5":"translate-x-0"}`})})]})}),n&&m&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white",children:["Deck Cards (",m.mainboard?.length||0,")"]})}),(0,t.jsx)("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:m.mainboard?.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-surface-50 dark:bg-surface-700 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-surface-900 dark:text-white",children:[e.quantity,"x"]}),(0,t.jsx)("span",{className:"text-sm text-surface-700 dark:text-surface-300",children:e.card?.name||"Unknown Card"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{},className:"p-1 text-red-400 hover:text-red-600 rounded transition-colors",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},a))})]}),(0,t.jsx)("button",{type:"submit",disabled:!i.name.trim()||x.isPending||h.isPending,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:x.isPending||h.isPending?(0,t.jsxs)("div",{className:"flex items-center justify-center",children:[(0,t.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),n?"Updating...":"Creating..."]}):n?"Update Deck":"Create Deck"})]})})]})})}):null},C=()=>{let e=(0,g.jE)(),[a,r]=(0,s.useState)(!1),[n,l]=(0,s.useState)(null),[i,c]=(0,s.useState)({search:"",game:"",format:"",isFavorite:!1}),[o,d]=(0,s.useState)("grid"),{data:m=[],isLoading:u}=(0,p.I)({queryKey:["decks",i],queryFn:()=>y.decks.getDecks(i)}),x=(0,f.n)({mutationFn:y.decks.deleteDeck,onSuccess:()=>{e.invalidateQueries({queryKey:["decks"]})}}),h=(0,f.n)({mutationFn:e=>{let{id:a,isFavorite:r}=e;return y.decks.updateDeck(a,{isFavorite:r})},onSuccess:()=>{e.invalidateQueries({queryKey:["decks"]})}}),b=m.filter(e=>{let a=!i.search||e.name.toLowerCase().includes(i.search.toLowerCase())||e.description?.toLowerCase().includes(i.search.toLowerCase()),r=!i.game||e.game===i.game,t=!i.format||e.format===i.format,s=!i.isFavorite||e.isFavorite;return a&&r&&t&&s});return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:"My Decks"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mt-1",children:"Build and manage your card decks"})]}),(0,t.jsxs)("button",{onClick:()=>r(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,t.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"New Deck"]})]}),(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,t.jsx)("input",{type:"text",value:i.search,onChange:e=>c(a=>({...a,search:e.target.value})),placeholder:"Search decks...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex space-x-2 overflow-x-auto pb-2",children:[(0,t.jsxs)("select",{value:i.game,onChange:e=>c(a=>({...a,game:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"",children:"All Games"}),(0,t.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,t.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,t.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,t.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]}),(0,t.jsxs)("select",{value:i.format,onChange:e=>c(a=>({...a,format:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"",children:"All Formats"}),(0,t.jsx)("option",{value:"standard",children:"Standard"}),(0,t.jsx)("option",{value:"modern",children:"Modern"}),(0,t.jsx)("option",{value:"commander",children:"Commander"}),(0,t.jsx)("option",{value:"pioneer",children:"Pioneer"}),(0,t.jsx)("option",{value:"legacy",children:"Legacy"}),(0,t.jsx)("option",{value:"vintage",children:"Vintage"})]}),(0,t.jsx)("button",{onClick:()=>c(e=>({...e,isFavorite:!e.isFavorite})),className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${i.isFavorite?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300":"bg-surface-50 dark:bg-surface-700 text-surface-700 dark:text-surface-300 border border-surface-300 dark:border-surface-600"}`,children:"⭐ Favorites"})]}),(0,t.jsxs)("div",{className:"flex bg-surface-100 dark:bg-surface-700 rounded-lg p-1",children:[(0,t.jsx)("button",{onClick:()=>d("grid"),className:`p-2 rounded-md transition-colors ${"grid"===o?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}),(0,t.jsx)("button",{onClick:()=>d("list"),className:`p-2 rounded-md transition-colors ${"list"===o?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})})]})]})]})}),u?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading decks..."})]})}):0===b.length?(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-8",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-surface-900 dark:text-white mb-2",children:0===m.length?"No decks yet":"No matching decks"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:0===m.length?"Start building your first deck from your collection":"Try adjusting your search or filters"}),0===m.length&&(0,t.jsx)("button",{onClick:()=>r(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-6 py-3 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:"Create Deck"})]})}):(0,t.jsx)("div",{className:"grid"===o?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4":"space-y-4",children:b.map(e=>(0,t.jsxs)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-all duration-200 hover:shadow-md",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-white text-xl font-semibold shadow-md",style:{backgroundColor:e.color||"#8b5cf6"},children:"\uD83C\uDFB4"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:e.name}),e.description&&(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 line-clamp-2",children:e.description})]})]}),(0,t.jsx)("button",{onClick:()=>(e=>{h.mutate({id:e.id,isFavorite:!e.isFavorite})})(e),className:`p-2 rounded-lg transition-colors ${e.isFavorite?"text-yellow-500 hover:text-yellow-600":"text-surface-400 hover:text-yellow-500"}`,children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:e.isFavorite?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-surface-600 dark:text-surface-400",children:[(0,t.jsxs)("span",{children:[e.totalCards||0," cards"]}),e.totalValue&&(0,t.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-medium",children:["$",e.totalValue.toFixed(2)]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(e.game)}`,children:e.game}),e.format&&(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e.toLowerCase()){case"standard":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"modern":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"commander":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"pioneer":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"legacy":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300";case"vintage":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(e.format)}`,children:e.format})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[void 0!==e.isLegal&&(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${e.isLegal?"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300":"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}`,children:e.isLegal?"✅ Legal":"❌ Illegal"}),e.averageManaValue&&(0,t.jsxs)("span",{className:"px-2 py-1 bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 rounded-full text-xs font-medium",children:[e.averageManaValue.toFixed(1)," CMC"]})]})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{},className:"flex-1 bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 py-2 px-3 rounded-lg text-sm font-medium hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors",children:"View Deck"}),(0,t.jsx)("button",{onClick:()=>l(e.id),className:"p-2 text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 rounded-lg transition-colors",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,t.jsx)("button",{onClick:()=>{var a,r;return a=e.id,r=e.name,void(window.confirm(`Are you sure you want to delete "${r}"? This action cannot be undone.`)&&x.mutate(a))},className:"p-2 text-red-400 hover:text-red-600 rounded-lg transition-colors",disabled:x.isPending,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]},e.id))}),(0,t.jsx)(N,{isOpen:a||!!n,onClose:()=>{r(!1),l(null)},deckId:n||void 0})]})},_=e=>{let{isOpen:a,onClose:r,cardId:n,initialCardData:l}=e,i=(0,g.jE)(),[c,o]=(0,s.useState)({cardId:l?.id||"",status:"owned",quantity:1,condition:"near_mint",notes:"",tags:[],collectionIds:[],deckIds:[]}),[d,m]=(0,s.useState)([]),[u,x]=(0,s.useState)([]),{data:h}=(0,p.I)({queryKey:["user-card",n],queryFn:()=>y.cards.getUserCard(n),enabled:!!n}),{data:b}=(0,p.I)({queryKey:["card-info",c.cardId],queryFn:()=>y.cards.getCard(c.cardId),enabled:!!c.cardId}),{data:v=[]}=(0,p.I)({queryKey:["tags"],queryFn:()=>y.tags.getTags()}),{data:j=[]}=(0,p.I)({queryKey:["collections"],queryFn:()=>y.collections.getCollections()}),k=(0,f.n)({mutationFn:y.cards.addCard,onSuccess:()=>{i.invalidateQueries({queryKey:["user-cards"]}),i.invalidateQueries({queryKey:["collections"]}),r()}}),w=(0,f.n)({mutationFn:e=>{let{id:a,data:r}=e;return y.cards.updateCard(a,r)},onSuccess:()=>{i.invalidateQueries({queryKey:["user-cards"]}),i.invalidateQueries({queryKey:["user-card",n]}),r()}});(0,s.useEffect)(()=>{h&&(o({cardId:h.cardId,status:h.status,quantity:h.quantity,condition:h.condition||"near_mint",notes:h.notes||"",tags:h.tags,collectionIds:h.collectionIds}),m(h.tags),x(h.collectionIds))},[h]);let N=async e=>{e.preventDefault();let a={...c,tags:d,collectionIds:u};n&&h?w.mutate({id:n,data:a}):k.mutate(a)};return a?(0,t.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:r,children:(0,t.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl max-h-[90vh] overflow-hidden animate-slide-up",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-6"}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:n?"Edit Card":"Add Card"}),(0,t.jsx)("button",{onClick:r,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"max-h-[calc(90vh-8rem)] overflow-y-auto",children:[b&&(0,t.jsx)("div",{className:"mb-6 p-4 bg-surface-50 dark:bg-surface-800 rounded-2xl",children:(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)("div",{className:"w-16 h-20 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center",children:b.image_url?(0,t.jsx)("img",{src:b.image_url,alt:b.name,className:"w-full h-full object-cover rounded-lg"}):(0,t.jsx)("svg",{className:"w-6 h-6 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white",children:b.name}),(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:b.set_name}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[(0,t.jsx)("span",{className:"px-2 py-1 bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 rounded-full text-xs font-medium",children:b.game}),(0,t.jsx)("span",{className:"px-2 py-1 bg-accent-100 dark:bg-accent-900/30 text-accent-700 dark:text-accent-300 rounded-full text-xs font-medium",children:b.rarity})]})]})]})}),(0,t.jsxs)("form",{onSubmit:N,className:"space-y-6",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-3",children:"Ownership Status"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>o(e=>({...e,status:"owned"})),className:`p-4 rounded-xl border-2 transition-all ${"owned"===c.status?"border-primary-500 bg-primary-50 dark:bg-primary-900/20":"border-surface-200 dark:border-surface-700"}`,children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-2xl mb-2",children:"✅"}),(0,t.jsx)("div",{className:"font-medium text-surface-900 dark:text-white",children:"Owned"}),(0,t.jsx)("div",{className:"text-sm text-surface-600 dark:text-surface-400",children:"Cards you own"})]})}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e=>({...e,status:"wanted"})),className:`p-4 rounded-xl border-2 transition-all ${"wanted"===c.status?"border-accent-500 bg-accent-50 dark:bg-accent-900/20":"border-surface-200 dark:border-surface-700"}`,children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-2xl mb-2",children:"❤️"}),(0,t.jsx)("div",{className:"font-medium text-surface-900 dark:text-white",children:"Wanted"}),(0,t.jsx)("div",{className:"text-sm text-surface-600 dark:text-surface-400",children:"Wishlist cards"})]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Quantity"}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>o(e=>({...e,quantity:Math.max(1,e.quantity-1)})),className:"w-10 h-10 bg-surface-100 dark:bg-surface-700 rounded-lg flex items-center justify-center text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 12H4"})})}),(0,t.jsx)("span",{className:"text-xl font-semibold text-surface-900 dark:text-white min-w-[3rem] text-center",children:c.quantity}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e=>({...e,quantity:e.quantity+1})),className:"w-10 h-10 bg-surface-100 dark:bg-surface-700 rounded-lg flex items-center justify-center text-surface-600 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600 transition-colors",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]})]}),"owned"===c.status&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Condition"}),(0,t.jsxs)("select",{value:c.condition,onChange:e=>o(a=>({...a,condition:e.target.value})),className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors",children:[(0,t.jsx)("option",{value:"mint",children:"Mint (M)"}),(0,t.jsx)("option",{value:"near_mint",children:"Near Mint (NM)"}),(0,t.jsx)("option",{value:"excellent",children:"Excellent (EX)"}),(0,t.jsx)("option",{value:"good",children:"Good (G)"}),(0,t.jsx)("option",{value:"light_played",children:"Light Played (LP)"}),(0,t.jsx)("option",{value:"played",children:"Played (P)"}),(0,t.jsx)("option",{value:"poor",children:"Poor (PO)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:v.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{m(a=>a.includes(e.id)?a.filter(a=>a!==e.id):[...a,e.id])},className:`px-3 py-2 rounded-full text-sm font-medium transition-colors ${d.includes(e.id)?"text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,style:{backgroundColor:d.includes(e.id)?e.color:void 0},children:e.name},e.id))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Collections"}),(0,t.jsx)("div",{className:"space-y-2 max-h-32 overflow-y-auto",children:j.map(e=>(0,t.jsxs)("label",{className:"flex items-center space-x-3",children:[(0,t.jsx)("input",{type:"checkbox",checked:u.includes(e.id),onChange:a=>{x(r=>a.target.checked?[...r,e.id]:r.filter(a=>a!==e.id))},className:"w-4 h-4 text-primary-600 bg-surface-50 border-surface-300 rounded focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-surface-800 dark:bg-surface-700 dark:border-surface-600"}),(0,t.jsx)("span",{className:"text-sm text-surface-700 dark:text-surface-300",children:e.name})]},e.id))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Notes"}),(0,t.jsx)("textarea",{value:c.notes,onChange:e=>o(a=>({...a,notes:e.target.value})),rows:3,placeholder:"Add any notes about this card...",className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors resize-none"})]}),(0,t.jsx)("button",{type:"submit",disabled:!c.cardId||k.isPending||w.isPending,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-4 px-6 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:k.isPending||w.isPending?(0,t.jsxs)("div",{className:"flex items-center justify-center",children:[(0,t.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),n?"Updating...":"Adding..."]}):n?"Update Card":"Add Card"})]})]})]})})}):null},S=e=>{let{isOpen:a,onClose:r,onCardSelect:n}=e,[l,i]=(0,s.useState)(""),[c,o]=(0,s.useState)(""),[d,m]=(0,s.useState)({game:"",rarity:"",status:"all"}),[u,x]=(0,s.useState)(null),[h,g]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=setTimeout(()=>{o(l)},300);return()=>clearTimeout(e)},[l]);let{data:f=[],isLoading:b}=(0,p.I)({queryKey:["card-search",c,d],queryFn:()=>c.trim()?y.cards.searchCards(c,d):y.cards.getAllCards(d),enabled:a});return a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:r,children:(0,t.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl h-[90vh] overflow-hidden animate-slide-up",children:[(0,t.jsxs)("div",{className:"p-4 pb-0",children:[(0,t.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"Browse Cards"}),(0,t.jsx)("button",{onClick:r,className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"relative mb-4",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,t.jsx)("input",{type:"text",value:l,onChange:e=>i(e.target.value),placeholder:"Search cards...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,t.jsxs)("div",{className:"flex space-x-2 mb-4 overflow-x-auto pb-2",children:[(0,t.jsxs)("select",{value:d.game,onChange:e=>m(a=>({...a,game:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"",children:"All Games"}),(0,t.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,t.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,t.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,t.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]}),(0,t.jsxs)("select",{value:d.rarity,onChange:e=>m(a=>({...a,rarity:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"",children:"All Rarities"}),(0,t.jsx)("option",{value:"Common",children:"Common"}),(0,t.jsx)("option",{value:"Uncommon",children:"Uncommon"}),(0,t.jsx)("option",{value:"Rare",children:"Rare"}),(0,t.jsx)("option",{value:"Super Rare",children:"Super Rare"}),(0,t.jsx)("option",{value:"Legendary",children:"Legendary"}),(0,t.jsx)("option",{value:"Mythic",children:"Mythic"})]})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto px-4 pb-4",onClick:e=>e.stopPropagation(),children:b?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Searching cards..."})]})}):0===f.length?(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-4",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white mb-2",children:"No cards found"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:"Try adjusting your search or filters"})]}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400 mb-4",children:[f.length," cards found"]}),f.map(e=>(0,t.jsxs)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-colors",children:[(0,t.jsxs)("div",{className:"flex items-start space-x-4",children:[(0,t.jsx)("div",{className:"w-12 h-16 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center flex-shrink-0",children:e.image_url?(0,t.jsx)("img",{src:e.image_url,alt:e.name,className:"w-full h-full object-cover rounded-lg"}):(0,t.jsx)("svg",{className:"w-4 h-4 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",children:e.name}),(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 truncate",children:e.set_name}),(0,t.jsx)("p",{className:"text-xs text-surface-500 dark:text-surface-500 mt-1",children:e.card_type}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(e.game)}`,children:e.game}),(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e.toLowerCase()){case"common":default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300";case"uncommon":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"rare":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"super rare":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"legendary":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"mythic":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}})(e.rarity)}`,children:e.rarity})]}),e.current_price&&(0,t.jsxs)("p",{className:"text-sm font-medium text-green-600 dark:text-green-400 mt-2",children:["$",e.current_price.toFixed(2)]})]}),(0,t.jsx)("button",{onClick:()=>{x(e),g(!0)},className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white p-2 rounded-xl transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5 flex-shrink-0",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]}),(e.mana_cost||e.power&&e.toughness)&&(0,t.jsxs)("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-surface-200 dark:border-surface-700",children:[e.mana_cost&&(0,t.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:["Mana Cost: ",e.mana_cost]}),e.power&&e.toughness&&(0,t.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:[e.power,"/",e.toughness]})]})]},e.id))]})})]})}),h&&u&&(0,t.jsx)(_,{isOpen:h,onClose:()=>{g(!1),x(null)},initialCardData:u})]}):null},L="https://api.scryfall.com",M="https://api.lorcast.com/v0",A="https://api.lorcana-api.com",$="https://tcg-vault.vercel.app/api/proxy/lorcana";class P{constructor(e,a){this.requests=[],this.maxRequests=e,this.timeWindow=a}async waitForSlot(){let e=Date.now();if(this.requests=this.requests.filter(a=>e-a=this.maxRequests){let a=this.requests[0],r=this.timeWindow-(e-a);await new Promise(e=>setTimeout(e,r))}this.requests.push(e)}}let O=new P(10,1e3),I=new P(5,1e3),D=new P(10,1e3),T={async searchCards(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;await O.waitForSlot();try{let r=await fetch(`${L}/cards/search?q=${encodeURIComponent(e)}&page=${a}`);if(!r.ok)throw Error(`Scryfall API error: ${r.status}`);return(await r.json()).data.map(e=>({id:e.id,name:e.name,set_name:e.set_name,set_code:e.set,card_number:e.collector_number,rarity:e.rarity,game:"MTG",mana_cost:e.mana_cost,cmc:e.cmc,card_type:e.type_line,colors:e.colors,oracle_text:e.oracle_text,power:e.power,toughness:e.toughness,image_url:e.image_uris?.normal,stock_image_url:e.image_uris?.normal,current_price:e.prices?.usd?parseFloat(e.prices.usd):void 0,market_price:e.prices?.usd_foil?parseFloat(e.prices.usd_foil):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(e){return console.error("Error fetching MTG cards:",e),[]}},async getCardByName(e){await O.waitForSlot();try{let a=await fetch(`${L}/cards/named?fuzzy=${encodeURIComponent(e)}`);if(!a.ok)return null;let r=await a.json();return{id:r.id,name:r.name,set_name:r.set_name,set_code:r.set,card_number:r.collector_number,rarity:r.rarity,game:"MTG",mana_cost:r.mana_cost,cmc:r.cmc,card_type:r.type_line,colors:r.colors,oracle_text:r.oracle_text,power:r.power,toughness:r.toughness,image_url:r.image_uris?.normal,stock_image_url:r.image_uris?.normal,current_price:r.prices?.usd?parseFloat(r.prices.usd):void 0,market_price:r.prices?.usd_foil?parseFloat(r.prices.usd_foil):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}catch(e){return console.error("Error fetching MTG card:",e),null}},async getRandomCards(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;await O.waitForSlot();try{let a=await fetch(`${L}/cards/random?q=game:paper&page_size=${e}`);if(!a.ok)throw Error(`Scryfall API error: ${a.status}`);let r=await a.json();return(Array.isArray(r)?r:[r]).map(e=>({id:e.id,name:e.name,set_name:e.set_name,set_code:e.set,card_number:e.collector_number,rarity:e.rarity,game:"MTG",mana_cost:e.mana_cost,cmc:e.cmc,card_type:e.type_line,colors:e.colors,oracle_text:e.oracle_text,power:e.power,toughness:e.toughness,image_url:e.image_uris?.normal,stock_image_url:e.image_uris?.normal,current_price:e.prices?.usd?parseFloat(e.prices.usd):void 0,market_price:e.prices?.usd_foil?parseFloat(e.prices.usd_foil):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(e){return console.error("Error fetching random MTG cards:",e),[]}}},z={async searchCards(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;await I.waitForSlot();try{let r=await fetch(`https://api.pokemontcg.io/v2/cards?q=name:${encodeURIComponent(e)}&page=${a}&pageSize=20`);if(!r.ok)throw Error(`Pok\xe9mon API error: ${r.status}`);return(await r.json()).data.map(e=>({id:e.id,name:e.name,set_name:e.set.name,set_code:e.set.id,card_number:e.number,rarity:e.rarity,game:"POKEMON",mana_cost:e.convertedRetreatCost?.toString(),cmc:e.convertedRetreatCost,card_type:e.supertype,colors:e.types||[],oracle_text:e.attacks?.map(e=>`${e.name}: ${e.text}`).join("\n"),power:e.hp,toughness:null,image_url:e.images.small,stock_image_url:e.images.large,current_price:e.cardmarket?.prices?.averageSellPrice||void 0,market_price:e.cardmarket?.prices?.lowPrice||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(e){return console.error("Error fetching Pok\xe9mon cards:",e),[]}},async getCardByName(e){let a=await this.searchCards(e,1);return a.length>0?a[0]:null}},R={async searchCards(e){try{let a=await fetch(`https://db.ygoprodeck.com/api/v7/cardinfo.php?fname=${encodeURIComponent(e)}`);if(!a.ok)throw Error(`Yu-Gi-Oh! API error: ${a.status}`);return(await a.json()).data.map(e=>({id:e.id,name:e.name,set_name:e.set_name,set_code:e.set_code,card_number:e.num,rarity:e.rarity,game:"YUGIOH",mana_cost:e.level?.toString(),cmc:e.level,card_type:e.type,colors:[e.attribute],oracle_text:e.desc,power:e.atk?.toString(),toughness:e.def?.toString(),image_url:e.card_images?.[0]?.image_url,stock_image_url:e.card_images?.[0]?.image_url_small,current_price:e.card_prices?.[0]?.amazon_price?parseFloat(e.card_prices[0].amazon_price):void 0,market_price:e.card_prices?.[0]?.cardmarket_price?parseFloat(e.card_prices[0].cardmarket_price):void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(e){return console.error("Error fetching Yu-Gi-Oh! cards:",e),[]}},async getCardByName(e){let a=await this.searchCards(e);return a.length>0?a[0]:null}},V={async searchCards(e){await D.waitForSlot();try{try{let a=await fetch(`${$}?search=${encodeURIComponent(e)}&api=lorcana`);if(a.ok){let e=await a.json();if(console.log("\uD83D\uDD0D Proxy API response:",JSON.stringify(e,null,2)),e.success&&e.data){let a=e.data.cards||e.data.data||e.data||[];if(a.length>0)return console.log(`✅ Found ${a.length} Lorcana cards via proxy (${e.source})`),console.log("\uD83D\uDD0D First card structure:",JSON.stringify(a[0],null,2)),a.map(e=>({id:e.id||e.uuid||e.card_id||`lorcana-${Math.random()}`,name:e.name||e.card_name||e.title||"",set_name:e.set?.name||e.set_name||e.set_name||"",set_code:e.set?.code||e.set_code||e.set_code||"",card_number:e.number||e.card_number||e.card_num||"",rarity:e.rarity||e.rarity_name||"",game:"LORCANA",mana_cost:e.cost?.toString()||e.mana_cost||e.ink_cost?.toString()||"",cmc:e.cost||e.cmc||e.ink_cost||0,card_type:e.type||e.card_type||e.type_name||"",colors:e.colors||e.ink||[],oracle_text:e.text||e.oracle_text||e.description||e.effect||"",power:e.strength?.toString()||e.power||e.attack?.toString()||"",toughness:e.willpower?.toString()||e.toughness||e.defense?.toString()||"",image_url:e.image_url||e.images?.small||e.images?.png||e.image||"",stock_image_url:e.image_url||e.images?.small||e.images?.png||e.image||"",current_price:e.price?.market||e.current_price||void 0,market_price:e.price?.low||e.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}}catch(e){console.log("❌ Proxy API failed, trying direct APIs")}try{let a=await fetch(`${A}/cards/fetch?search=name~${encodeURIComponent(e)}`);if(a.ok){let e=await a.json();console.log("\uD83D\uDD0D Direct API response:",JSON.stringify(e,null,2));let r=e.cards||e.data||e||[];if(r.length>0)return console.log(`✅ Found ${r.length} Lorcana cards from direct Lorcana API`),console.log("\uD83D\uDD0D First card structure:",JSON.stringify(r[0],null,2)),r.map(e=>({id:e.id||e.uuid||e.card_id||`lorcana-${Math.random()}`,name:e.name||e.card_name||e.title||"",set_name:e.set?.name||e.set_name||e.set_name||"",set_code:e.set?.code||e.set_code||e.set_code||"",card_number:e.number||e.card_number||e.card_num||"",rarity:e.rarity||e.rarity_name||"",game:"LORCANA",mana_cost:e.cost?.toString()||e.mana_cost||e.ink_cost?.toString()||"",cmc:e.cost||e.cmc||e.ink_cost||0,card_type:e.type||e.card_type||e.type_name||"",colors:e.colors||e.ink||[],oracle_text:e.text||e.oracle_text||e.description||e.effect||"",power:e.strength?.toString()||e.power||e.attack?.toString()||"",toughness:e.willpower?.toString()||e.toughness||e.defense?.toString()||"",image_url:e.image_url||e.images?.small||e.images?.png||e.image||"",stock_image_url:e.image_url||e.images?.small||e.images?.png||e.image||"",current_price:e.price?.market||e.current_price||void 0,market_price:e.price?.low||e.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}catch(e){console.log("❌ Direct Lorcana API failed")}for(let a of[`/cards?q=${encodeURIComponent(e)}`,`/cards?search=${encodeURIComponent(e)}`,`/cards?query=${encodeURIComponent(e)}`])try{let e=await fetch(`${M}${a}`);if(e.ok){let r=await e.json();console.log(`🔍 Lorcast API response from ${a}:`,JSON.stringify(r,null,2));let t=r.cards||r.data||r||[];if(t.length>0)return console.log(`✅ Found ${t.length} Lorcana cards from Lorcast ${a}`),console.log("\uD83D\uDD0D First card structure:",JSON.stringify(t[0],null,2)),t.map(e=>({id:e.id||e.uuid||e.card_id||`lorcana-${Math.random()}`,name:e.name||e.card_name||e.title||"",set_name:e.set?.name||e.set_name||e.set_name||"",set_code:e.set?.code||e.set_code||e.set_code||"",card_number:e.number||e.card_number||e.card_num||"",rarity:e.rarity||e.rarity_name||"",game:"LORCANA",mana_cost:e.cost?.toString()||e.mana_cost||e.ink_cost?.toString()||"",cmc:e.cost||e.cmc||e.ink_cost||0,card_type:e.type||e.card_type||e.type_name||"",colors:e.colors||e.ink||[],oracle_text:e.text||e.oracle_text||e.description||e.effect||"",power:e.strength?.toString()||e.power||e.attack?.toString()||"",toughness:e.willpower?.toString()||e.toughness||e.defense?.toString()||"",image_url:e.image_url||e.images?.small||e.images?.png||e.image||"",stock_image_url:e.image_url||e.images?.small||e.images?.png||e.image||"",current_price:e.price?.market||e.current_price||void 0,market_price:e.price?.low||e.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}catch(e){console.log(`❌ Failed to search from Lorcast ${a}:`,e);continue}return console.log("⚠️ No Lorcana cards found from any API"),[]}catch(e){return console.error("Error searching Lorcana cards:",e),[]}},async getCardByName(e){await D.waitForSlot();try{try{let a=await fetch(`${$}?search=${encodeURIComponent(e)}&api=lorcana`);if(a.ok){let r=await a.json();if(r.success&&r.data){let a=r.data.cards||r.data.data||r.data||[];if(a.length>0){let t=a[0];return console.log(`✅ Found Lorcana card "${e}" via proxy (${r.source})`),{id:t.id||t.uuid||t.card_id||`lorcana-${Math.random()}`,name:t.name||t.card_name||t.title||"",set_name:t.set?.name||t.set_name||t.set_name||"",set_code:t.set?.code||t.set_code||t.set_code||"",card_number:t.number||t.card_number||t.card_num||"",rarity:t.rarity||t.rarity_name||"",game:"LORCANA",mana_cost:t.cost?.toString()||t.mana_cost||t.ink_cost?.toString()||"",cmc:t.cost||t.cmc||t.ink_cost||0,card_type:t.type||t.card_type||t.type_name||"",colors:t.colors||t.ink||[],oracle_text:t.text||t.oracle_text||t.description||t.effect||"",power:t.strength?.toString()||t.power||t.attack?.toString()||"",toughness:t.willpower?.toString()||t.toughness||t.defense?.toString()||"",image_url:t.image_url||t.images?.small||t.images?.png||t.image||"",stock_image_url:t.image_url||t.images?.small||t.images?.png||t.image||"",current_price:t.price?.market||t.current_price||void 0,market_price:t.price?.low||t.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}}}}catch(e){console.log("❌ Proxy API failed for card lookup, trying direct APIs")}try{let a=await fetch(`${A}/cards/fetch?search=name~${encodeURIComponent(e)}`);if(a.ok){let r=await a.json(),t=r.cards||r.data||r||[];if(t.length>0){let a=t[0];return console.log(`✅ Found Lorcana card "${e}" from direct Lorcana API`),{id:a.id||a.uuid||a.card_id||`lorcana-${Math.random()}`,name:a.name||a.card_name||a.title||"",set_name:a.set?.name||a.set_name||a.set_name||"",set_code:a.set?.code||a.set_code||a.set_code||"",card_number:a.number||a.card_number||a.card_num||"",rarity:a.rarity||a.rarity_name||"",game:"LORCANA",mana_cost:a.cost?.toString()||a.mana_cost||a.ink_cost?.toString()||"",cmc:a.cost||a.cmc||a.ink_cost||0,card_type:a.type||a.card_type||a.type_name||"",colors:a.colors||a.ink||[],oracle_text:a.text||a.oracle_text||a.description||a.effect||"",power:a.strength?.toString()||a.power||a.attack?.toString()||"",toughness:a.willpower?.toString()||a.toughness||a.defense?.toString()||"",image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",stock_image_url:a.image_url||a.images?.small||a.images?.png||a.image||"",current_price:a.price?.market||a.current_price||void 0,market_price:a.price?.low||a.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}}}catch(e){console.log("❌ Direct Lorcana API failed for card lookup")}for(let a of[`/cards?q=name:${encodeURIComponent(e)}`,`/cards?search=${encodeURIComponent(e)}`,`/cards?query=${encodeURIComponent(e)}`])try{let r=await fetch(`${M}${a}`);if(r.ok){let t=await r.json(),s=t.cards||t.data||t||[];if(s.length>0){let r=s[0];return console.log(`✅ Found Lorcana card "${e}" from Lorcast ${a}`),{id:r.id||r.uuid||r.card_id||`lorcana-${Math.random()}`,name:r.name||r.card_name||r.title||"",set_name:r.set?.name||r.set_name||r.set_name||"",set_code:r.set?.code||r.set_code||r.set_code||"",card_number:r.number||r.card_number||r.card_num||"",rarity:r.rarity||r.rarity_name||"",game:"LORCANA",mana_cost:r.cost?.toString()||r.mana_cost||r.ink_cost?.toString()||"",cmc:r.cost||r.cmc||r.ink_cost||0,card_type:r.type||r.card_type||r.type_name||"",colors:r.colors||r.ink||[],oracle_text:r.text||r.oracle_text||r.description||r.effect||"",power:r.strength?.toString()||r.power||r.attack?.toString()||"",toughness:r.willpower?.toString()||r.toughness||r.defense?.toString()||"",image_url:r.image_url||r.images?.small||r.images?.png||r.image||"",stock_image_url:r.image_url||r.images?.small||r.images?.png||r.image||"",current_price:r.price?.market||r.current_price||void 0,market_price:r.price?.low||r.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}}}}catch(e){console.log(`❌ Failed to fetch card from Lorcast ${a}:`,e);continue}return console.log(`⚠️ Lorcana card "${e}" not found from any API`),null}catch(e){return console.error("Error fetching Lorcana card:",e),null}},async getRandomCards(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;await D.waitForSlot();try{try{let a=await fetch(`${$}?limit=${e}&api=lorcana`);if(a.ok){let r=await a.json();if(r.success&&r.data){let a=r.data.cards||r.data.data||r.data||[];if(a.length>0)return console.log(`✅ Found ${a.length} cards via proxy (${r.source})`),a.sort(()=>.5-Math.random()).slice(0,e).map(e=>({id:e.id||e.uuid||`lorcana-${Math.random()}`,name:e.name,set_name:e.set?.name||e.set_name||"",set_code:e.set?.code||e.set_code||"",card_number:e.number||e.card_number||"",rarity:e.rarity,game:"LORCANA",mana_cost:e.cost?.toString()||e.mana_cost,cmc:e.cost||e.cmc,card_type:e.type||e.card_type,colors:e.colors||[],oracle_text:e.text||e.oracle_text||"",power:e.strength?.toString()||e.power,toughness:e.willpower?.toString()||e.toughness,image_url:e.image_url||e.images?.small||e.images?.png,stock_image_url:e.image_url||e.images?.small||e.images?.png,current_price:e.price?.market||e.current_price||void 0,market_price:e.price?.low||e.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}}catch(e){console.log("❌ Proxy API failed for random cards, trying direct APIs")}try{let a=await fetch(`${A}/cards/fetch?pagesize=${e}`);if(a.ok){let r=await a.json(),t=r.cards||r.data||r||[];if(t.length>0)return console.log(`✅ Found ${t.length} cards from direct Lorcana API`),t.sort(()=>.5-Math.random()).slice(0,e).map(e=>({id:e.id||e.uuid||`lorcana-${Math.random()}`,name:e.name,set_name:e.set?.name||e.set_name||"",set_code:e.set?.code||e.set_code||"",card_number:e.number||e.card_number||"",rarity:e.rarity,game:"LORCANA",mana_cost:e.cost?.toString()||e.mana_cost,cmc:e.cost||e.cmc,card_type:e.type||e.card_type,colors:e.colors||[],oracle_text:e.text||e.oracle_text||"",power:e.strength?.toString()||e.power,toughness:e.willpower?.toString()||e.toughness,image_url:e.image_url||e.images?.small||e.images?.png,stock_image_url:e.image_url||e.images?.small||e.images?.png,current_price:e.price?.market||e.current_price||void 0,market_price:e.price?.low||e.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}}catch(e){console.log("❌ Direct Lorcana API failed for random cards")}let a=[];for(let e of["/cards","/api/cards","/v0/cards"])try{let r=await fetch(`${M}${e}`);if(r.ok){let t=await r.json();a=t.cards||t.data||t||[],console.log(`✅ Found ${a.length} cards from Lorcast ${e}`);break}}catch(a){console.log(`❌ Failed to fetch from Lorcast ${e}:`,a);continue}if(0===a.length)return console.log("⚠️ No cards found from any endpoint, returning empty array"),[];return a.sort(()=>.5-Math.random()).slice(0,e).map(e=>({id:e.id||e.uuid||`lorcana-${Math.random()}`,name:e.name,set_name:e.set?.name||e.set_name||"",set_code:e.set?.code||e.set_code||"",card_number:e.number||e.card_number||"",rarity:e.rarity,game:"LORCANA",mana_cost:e.cost?.toString()||e.mana_cost,cmc:e.cost||e.cmc,card_type:e.type||e.card_type,colors:e.colors||[],oracle_text:e.text||e.oracle_text||"",power:e.strength?.toString()||e.power,toughness:e.willpower?.toString()||e.toughness,image_url:e.image_url||e.images?.small||e.images?.png,stock_image_url:e.image_url||e.images?.small||e.images?.png,current_price:e.price?.market||e.current_price||void 0,market_price:e.price?.low||e.market_price||void 0,verified:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}))}catch(e){return console.error("Error fetching random Lorcana cards:",e),[]}}},B={async searchCards(e,a){console.log(`🔍 Database search: "${e}" for game: "${a}"`);try{let r=new URLSearchParams({q:e,limit:"50"});a&&"ALL"!==a&&r.append("game",a);let t=await fetch(`https://tcg-vault.vercel.app/api/cards?${r}`);if(!t.ok)throw Error(`Database search failed: ${t.status}`);let s=await t.json();if(s.success&&s.data)return console.log(`✅ Found ${s.data.length} cards from database`),s.data.map(e=>({id:e.id,name:e.name,set_name:e.set_name,set_code:e.set_code,card_number:e.card_number,rarity:e.rarity,game:e.game,mana_cost:e.mana_cost,cmc:e.cmc,card_type:e.card_type,colors:e.colors||[],oracle_text:e.oracle_text,power:e.power,toughness:e.toughness,image_url:e.image_url,stock_image_url:e.stock_image_url,current_price:e.current_price,market_price:e.market_price,verified:e.verified,createdAt:e.createdAt,updatedAt:e.updatedAt}));return[]}catch(e){return console.error("Error in database card search:",e),[]}},async getCardByName(e,a){try{if("MTG"===a)return await T.getCardByName(e);if("POKEMON"===a)return await z.getCardByName(e);if("YUGIOH"===a)return await R.getCardByName(e);if("LORCANA"===a)return await V.getCardByName(e);let r=await T.getCardByName(e);if(r)return r;let t=await z.getCardByName(e);if(t)return t;let s=await R.getCardByName(e);if(s)return s;let n=await V.getCardByName(e);if(n)return n;return null}catch(e){return console.error("Error in unified card search by name:",e),null}},async getRandomCards(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,a=arguments.length>1?arguments[1]:void 0,r=[];console.log(`🎲 Getting ${e} random cards for game: "${a}"`);try{if(!a||"MTG"===a){console.log("\uD83C\uDFB2 Getting random MTG cards...");let a=await T.getRandomCards(Math.ceil(e/4));console.log(`✅ Found ${a.length} random MTG cards`),r.push(...a)}if(!a||"LORCANA"===a){console.log("\uD83C\uDFB2 Getting random Lorcana cards...");let a=await V.getRandomCards(Math.ceil(e/4));console.log(`✅ Found ${a.length} random Lorcana cards`),r.push(...a)}let t=r.slice(0,e);return console.log(`🎯 Returning ${t.length} random cards`),t}catch(e){return console.error("Error getting random cards:",e),[]}}},F=e=>{let{isOpen:a,onClose:r,onCardSelect:n}=e,[l,i]=(0,s.useState)(""),[c,o]=(0,s.useState)(""),[d,m]=(0,s.useState)(""),[u,x]=(0,s.useState)(null),[h,b]=(0,s.useState)(!1),[v,j]=(0,s.useState)(!1),[y,k]=(0,s.useState)("cards"),w=(0,g.jE)();(0,s.useEffect)(()=>{let e=setTimeout(()=>{o(l)},500);return()=>clearTimeout(e)},[l]);let{data:N=[],isLoading:C}=(0,p.I)({queryKey:["external-cards",c,d],queryFn:async()=>{if(!c.trim())return[];j(!0);try{let e=await B.searchCards(c,d||void 0);return console.log(`Found ${e.length} cards for search "${c}" in game "${d}"`),e}catch(e){return console.error("Error searching external cards:",e),[]}finally{j(!1)}},enabled:!!c.trim()&&a,staleTime:3e5,retry:2}),{data:_=[]}=(0,p.I)({queryKey:["random-cards",d],queryFn:async()=>{try{let e=await B.getRandomCards(20,d||void 0);return console.log(`Found ${e.length} random cards for game "${d}"`),e}catch(e){return console.error("Error fetching random cards:",e),[]}},enabled:a&&!c.trim(),staleTime:6e5,retry:2}),S=(0,f.n)({mutationFn:async e=>{let a=await fetch("/api/cards/find-or-create",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("tcg-vault-token")}`},body:JSON.stringify({name:e.name,game:e.game,setName:e.set_name,setCode:e.set_code,rarity:e.rarity,cardType:e.card_type,manaCost:e.mana_cost,imageUrl:e.stock_image_url})});if(!a.ok)throw Error("Failed to add card to database");return(await a.json()).card},onSuccess:()=>{w.invalidateQueries({queryKey:["cards"]})}}),L=async e=>{n?(n(e),r()):(x(e),b(!0))},M=async e=>{try{await S.mutateAsync(e),alert(`${e.name} has been added to the database!`)}catch(e){console.error("Error adding card to database:",e),alert("Failed to add card to database. Please try again.")}},A=e=>{switch(e){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}},$=e=>{switch(e?.toLowerCase()){case"common":default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300";case"uncommon":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"rare":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"super rare":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"legendary":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"mythic":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}};if(!a)return null;let P=c.trim()?N:_,O=C||v;return console.log("CardDatabaseBrowser state:",{isOpen:a,searchTerm:l,debouncedSearch:c,selectedGame:d,externalCards:N.length,randomCards:_.length,displayCards:P.length,isLoading:O}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:r,children:(0,t.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl h-[90vh] overflow-hidden animate-slide-up",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{className:"p-4 pb-0",children:[(0,t.jsx)("div",{className:"w-12 h-1.5 bg-surface-300 dark:bg-surface-600 rounded-full mx-auto mb-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-surface-900 dark:text-white",children:"Card Database Browser"}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),r()},className:"p-2 rounded-xl text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"relative mb-4",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,t.jsx)("input",{type:"text",value:l,onChange:e=>i(e.target.value),onKeyDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),placeholder:"Search cards from external databases...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,t.jsxs)("div",{className:"flex space-x-2 mb-4 overflow-x-auto pb-2",children:[(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),m("")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${!d?"bg-primary-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"All Games"}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),m("MTG")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"MTG"===d?"bg-orange-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Magic: The Gathering"}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),m("POKEMON")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"POKEMON"===d?"bg-yellow-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Pok\xe9mon"}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),m("YUGIOH")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"YUGIOH"===d?"bg-blue-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Yu-Gi-Oh!"}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),m("LORCANA")},className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${"LORCANA"===d?"bg-purple-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300"}`,children:"Disney Lorcana"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-surface-700 dark:text-surface-300",children:"View:"}),(0,t.jsxs)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),k("cards")},className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${"cards"===y?"bg-primary-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})}),"Cards"]}),(0,t.jsxs)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),k("table")},className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${"table"===y?"bg-primary-500 text-white":"bg-surface-100 dark:bg-surface-700 text-surface-700 dark:text-surface-300 hover:bg-surface-200 dark:hover:bg-surface-600"}`,children:[(0,t.jsx)("svg",{className:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H6a2 2 0 00-2 2v8a2 2 0 002 2z"})}),"Table"]})]}),P.length>0&&(0,t.jsxs)("span",{className:"text-sm text-surface-600 dark:text-surface-400",children:[P.length," card",1!==P.length?"s":""]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto pb-20",children:O?(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500"}),(0,t.jsx)("span",{className:"ml-3 text-surface-600 dark:text-surface-400",children:"Searching external databases..."})]}):0===P.length?(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)("div",{className:"text-6xl mb-4",children:"\uD83D\uDD0D"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white mb-2",children:c.trim()?"No cards found":"Discover Cards"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:c.trim()?"Try adjusting your search terms or game filter":"Search for cards to see results from external databases"})]}):(0,t.jsxs)(t.Fragment,{children:["cards"===y&&(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:P.map(e=>(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4 transition-all duration-200 hover:shadow-md",children:(0,t.jsxs)("div",{className:"flex items-start space-x-4",children:[(0,t.jsx)("div",{className:"w-16 h-20 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center flex-shrink-0",children:e.stock_image_url?(0,t.jsx)("img",{src:e.stock_image_url,alt:e.name,className:"w-full h-full object-cover rounded-lg"}):(0,t.jsx)("svg",{className:"w-6 h-6 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",children:e.name}),(0,t.jsxs)("p",{className:"text-sm text-surface-600 dark:text-surface-400",children:[e.set_name," • ",e.card_number]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mt-2",children:[(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${A(e.game)}`,children:e.game}),e.rarity&&(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${$(e.rarity)}`,children:e.rarity}),e.current_price&&(0,t.jsxs)("span",{className:"px-2 py-1 bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300 rounded-full text-xs font-medium",children:["$",e.current_price]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),L(e)},className:"px-3 py-1 bg-primary-500 hover:bg-primary-600 text-white text-xs font-medium rounded-lg transition-colors",children:"Add to Collection"}),(0,t.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),M(e)},disabled:S.isPending,className:"px-3 py-1 bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-700 dark:text-surface-300 text-xs font-medium rounded-lg transition-colors disabled:opacity-50",children:S.isPending?"Adding...":"Add to DB"})]})]})},`${e.game}-${e.id}`))}),"table"===y&&(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 overflow-hidden",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full",children:[(0,t.jsx)("thead",{className:"bg-surface-50 dark:bg-surface-700",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Card"}),(0,t.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Set"}),(0,t.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Game"}),(0,t.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Rarity"}),(0,t.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Price"}),(0,t.jsx)("th",{className:"px-4 py-3 text-left text-xs font-medium text-surface-600 dark:text-surface-400 uppercase tracking-wider",children:"Actions"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-surface-200 dark:divide-surface-700",children:P.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-surface-50 dark:hover:bg-surface-700 transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"w-10 h-12 bg-surface-200 dark:bg-surface-700 rounded flex items-center justify-center flex-shrink-0",children:e.stock_image_url?(0,t.jsx)("img",{src:e.stock_image_url,alt:e.name,className:"w-full h-full object-cover rounded"}):(0,t.jsx)("svg",{className:"w-4 h-4 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-surface-900 dark:text-white truncate",children:e.name}),(0,t.jsxs)("div",{className:"text-xs text-surface-500 dark:text-surface-400",children:["#",e.card_number]})]})]})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-surface-900 dark:text-white",children:e.set_name}),(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${A(e.game)}`,children:e.game})}),(0,t.jsx)("td",{className:"px-4 py-3",children:e.rarity&&(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${$(e.rarity)}`,children:e.rarity})}),(0,t.jsx)("td",{className:"px-4 py-3 text-sm text-surface-900 dark:text-white",children:e.current_price?`$${e.current_price}`:"-"}),(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),L(e)},className:"px-2 py-1 bg-primary-500 hover:bg-primary-600 text-white text-xs font-medium rounded transition-colors",children:"Add"}),(0,t.jsx)("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),M(e)},disabled:S.isPending,className:"px-2 py-1 bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-700 dark:text-surface-300 text-xs font-medium rounded transition-colors disabled:opacity-50",children:"DB"})]})})]},`${e.game}-${e.id}`))})]})})})]})})]})})}),u&&h&&(0,t.jsx)("div",{className:"fixed inset-0 z-60",children:(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50",onClick:()=>b(!1),children:(0,t.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-surface-900 rounded-t-3xl p-6 max-h-[80vh] overflow-y-auto",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("h3",{className:"text-lg font-semibold text-surface-900 dark:text-white mb-4",children:["Add ",u.name," to your collection"]}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:"This card will be added to your collection with the details you specify."}),(0,t.jsxs)("div",{className:"flex space-x-4",children:[(0,t.jsx)("button",{onClick:()=>{L(u),b(!1)},className:"flex-1 bg-primary-500 hover:bg-primary-600 text-white font-medium py-3 px-6 rounded-xl transition-colors",children:"Continue"}),(0,t.jsx)("button",{onClick:()=>b(!1),className:"flex-1 bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-700 dark:text-surface-300 font-medium py-3 px-6 rounded-xl transition-colors",children:"Cancel"})]})]})})})})]})},E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{maxTilt:a=15,perspective:r=1e3,scale:t=1.05,speed:n=600,reset:l=!0,easing:i="cubic-bezier(0.25, 0.46, 0.45, 0.94)"}=e,c=(0,s.useRef)(null),[o,d]=(0,s.useState)({tiltX:0,tiltY:0,scale:1,transform:""}),m=(0,s.useCallback)((e,s,n)=>{let l=n.left+n.width/2,i=(s-(n.top+n.height/2))/(n.height/2)*a,c=(l-e)/(n.width/2)*a,o=`perspective(${r}px) rotateX(${i}deg) rotateY(${c}deg) scale(${t})`;d({tiltX:i,tiltY:c,scale:t,transform:o})},[a,r,t]),u=(0,s.useCallback)(()=>{d({tiltX:0,tiltY:0,scale:1,transform:`perspective(${r}px) rotateX(0deg) rotateY(0deg) scale(1)`})},[r]),x=(0,s.useCallback)(e=>{if(!c.current)return;let a=c.current.getBoundingClientRect();m(e.clientX,e.clientY,a)},[m]),h=(0,s.useCallback)(()=>{c.current&&c.current.addEventListener("mousemove",x)},[x]),g=(0,s.useCallback)(()=>{c.current&&(c.current.removeEventListener("mousemove",x),l&&u())},[x,l,u]);(0,s.useEffect)(()=>{let e=c.current;if(e)return e.addEventListener("mouseenter",h),e.addEventListener("mouseleave",g),()=>{e.removeEventListener("mouseenter",h),e.removeEventListener("mouseleave",g),e.removeEventListener("mousemove",x)}},[h,g,x]);let p={transform:o.transform,transformStyle:"preserve-3d",transition:l?`transform ${n}ms ${i}`:"none"};return{ref:c,tiltState:o,tiltStyles:p,resetTilt:u}},H=e=>{let{card:a,userImages:r=[],size:n="medium",showUserPhotos:l=!1,className:i=""}=e,[c,o]=(0,s.useState)(!1),[d,m]=(0,s.useState)(0),[u,x]=(0,s.useState)(l),{ref:h,tiltStyles:g}=E({maxTilt:"large"===n?15:10,scale:1,speed:400,easing:"cubic-bezier(0.23, 1, 0.320, 1)"}),p=()=>["super rare","legendary","mythic"].includes(a.rarity.toLowerCase()),f=()=>{let e=a.rarity.toLowerCase().replace(/\s+/g,"");return`rarity-border-${e}`},b={small:"w-16 h-22",medium:"w-24 h-32",large:"w-48 h-64"},v=u&&r.length>0?r[d]:a.stock_image_url||a.image_url;if(!v||c)return(()=>{let e={MTG:"from-orange-400 to-red-500",POKEMON:"from-yellow-400 to-red-500",LORCANA:"from-purple-400 to-pink-500"}[a.game]||"from-gray-400 to-gray-600",r=f(),s=p()?"foil-rainbow":"";return(0,t.jsxs)("div",{ref:h,style:g,className:`${b[n]} bg-gradient-to-br ${e} rounded-lg flex flex-col items-center justify-center text-white shadow-md card-transition card-depth ${r} ${s} ${i}`,children:[(0,t.jsx)("div",{className:"text-lg font-bold mb-1",children:"\uD83C\uDCCF"}),(0,t.jsx)("div",{className:"text-xs text-center px-2 leading-tight",children:a.name.split(" ").slice(0,2).join(" ")}),(0,t.jsx)("div",{className:"text-xs opacity-75 mt-1",children:a.game})]})})();let j=f(),y=p()?"foil-card":"",k="legendary"===a.rarity.toLowerCase()||"mythic"===a.rarity.toLowerCase()?"holographic":"";return(0,t.jsxs)("div",{className:`relative ${i}`,children:[(0,t.jsx)("div",{ref:h,style:g,className:`card-transition card-depth ${j} ${y} ${k} rounded-lg`,children:(0,t.jsx)("img",{src:v,alt:a.name,className:`${b[n]} object-cover rounded-lg`,onError:()=>o(!0)})}),u&&r.length>0&&(0,t.jsxs)("div",{className:"absolute top-1 left-1 bg-blue-500 text-white text-xs px-1 py-0.5 rounded",children:["\uD83D\uDCF8 ",d+1,"/",r.length]}),r.length>0&&(0,t.jsx)("div",{className:"absolute bottom-1 right-1",children:(0,t.jsx)("button",{onClick:()=>x(!u),className:"bg-black bg-opacity-50 text-white text-xs px-1 py-0.5 rounded hover:bg-opacity-75",title:u?"Show stock image":"Show your photos",children:u?"\uD83D\uDCCB":"\uD83D\uDCF8"})}),u&&r.length>1&&(0,t.jsxs)("div",{className:"absolute bottom-1 left-1 flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>m(e=>Math.max(0,e-1)),disabled:0===d,className:"bg-black bg-opacity-50 text-white text-xs px-1 py-0.5 rounded disabled:opacity-50",children:"‹"}),(0,t.jsx)("button",{onClick:()=>m(e=>Math.min(r.length-1,e+1)),disabled:d===r.length-1,className:"bg-black bg-opacity-50 text-white text-xs px-1 py-0.5 rounded disabled:opacity-50",children:"›"})]}),(0,t.jsx)("div",{className:"absolute top-1 right-1",children:u?(0,t.jsx)("span",{className:"bg-blue-500 text-white text-xs px-1 py-0.5 rounded",title:"Your card photo",children:"\uD83D\uDC64"}):(0,t.jsx)("span",{className:"bg-green-500 text-white text-xs px-1 py-0.5 rounded",title:"Stock image",children:"✓"})})]})},G=e=>{let{children:a,rarity:r,className:s=""}=e;return(0,t.jsx)("div",{className:`${(()=>{let e=r.toLowerCase().replace(/\s+/g,"");return`rarity-border-${e}`})()} ${(()=>{switch(r.toLowerCase()){case"mythic":return"mythic-expansion premium-card-animation";case"legendary":case"super rare":return"premium-card-animation";default:return"card-expansion-organic"}})()} ${s}`,children:a})},W=()=>{let[e,a]=(0,s.useState)(""),[r,n]=(0,s.useState)({game:"",rarity:"",status:"all",search:""}),[l,i]=(0,s.useState)("card"),[c,o]=(0,s.useState)(!1),[d,m]=(0,s.useState)(!1),[u,x]=(0,s.useState)(null),{data:h=[],isLoading:g,error:f}=(0,p.I)({queryKey:["user-cards",{...r,search:e}],queryFn:()=>y.cards.getUserCards({...r,search:e})}),b=h.filter(e=>{let a=e.card;return!!a&&(!r.rarity||a.rarity===r.rarity)&&(!r.game||a.game===r.game)&&(!r.status||"all"===r.status||e.status===r.status)}),v=e=>{switch(e){case"MTG":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"POKEMON":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"LORCANA":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"YUGIOH":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}},j=e=>{switch(e.toLowerCase()){case"common":default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300";case"uncommon":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"rare":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"super rare":return"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300";case"legendary":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"mythic":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"}},k=e=>{switch(e){case"owned":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"wanted":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white",children:"My Cards"}),(0,t.jsxs)("p",{className:"text-surface-600 dark:text-surface-400 mt-1",children:[b.length," cards in your collection"]})]}),(0,t.jsxs)("div",{className:"flex space-x-3",children:[(0,t.jsxs)("button",{onClick:()=>o(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,t.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"Add Cards"]}),(0,t.jsxs)("button",{onClick:()=>m(!0),className:"bg-gradient-to-r from-accent-500 to-primary-500 hover:from-accent-600 hover:to-primary-600 text-white px-4 py-2 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:[(0,t.jsx)("svg",{className:"w-4 h-4 mr-2 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),"Browse Database"]})]})]}),(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-4",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,t.jsx)("input",{type:"text",value:e,onChange:e=>a(e.target.value),placeholder:"Search your cards...",className:"w-full pl-10 pr-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex space-x-2 overflow-x-auto pb-2",children:[(0,t.jsxs)("select",{value:r.game,onChange:e=>n(a=>({...a,game:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"",children:"All Games"}),(0,t.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,t.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,t.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"}),(0,t.jsx)("option",{value:"YUGIOH",children:"Yu-Gi-Oh!"})]}),(0,t.jsxs)("select",{value:r.rarity,onChange:e=>n(a=>({...a,rarity:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"",children:"All Rarities"}),(0,t.jsx)("option",{value:"Common",children:"Common"}),(0,t.jsx)("option",{value:"Uncommon",children:"Uncommon"}),(0,t.jsx)("option",{value:"Rare",children:"Rare"}),(0,t.jsx)("option",{value:"Super Rare",children:"Super Rare"}),(0,t.jsx)("option",{value:"Legendary",children:"Legendary"}),(0,t.jsx)("option",{value:"Mythic",children:"Mythic"})]}),(0,t.jsxs)("select",{value:r.status,onChange:e=>n(a=>({...a,status:e.target.value})),className:"px-3 py-2 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 transition-colors whitespace-nowrap",children:[(0,t.jsx)("option",{value:"all",children:"All Cards"}),(0,t.jsx)("option",{value:"owned",children:"Owned"}),(0,t.jsx)("option",{value:"wanted",children:"Wanted"})]})]}),(0,t.jsxs)("div",{className:"flex bg-surface-100 dark:bg-surface-700 rounded-lg p-1",children:[(0,t.jsx)("button",{onClick:()=>i("card"),className:`p-2 rounded-md transition-colors ${"card"===l?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,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"})})}),(0,t.jsx)("button",{onClick:()=>i("list"),className:`p-2 rounded-md transition-colors ${"list"===l?"bg-white dark:bg-surface-600 text-surface-900 dark:text-white shadow-sm":"text-surface-600 dark:text-surface-400 hover:text-surface-900 dark:hover:text-white"}`,children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})})]})]})]})}),g&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-8 h-8 bg-gradient-to-r from-primary-500 to-accent-500 rounded-full flex items-center justify-center animate-bounce-subtle mb-3",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading your cards..."})]})}),f&&(0,t.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl p-4 mb-6",children:(0,t.jsx)("p",{className:"text-red-800 dark:text-red-400",children:"Error loading cards. Please try again."})}),!g&&!f&&(0,t.jsx)(t.Fragment,{children:0===b.length?(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 p-8",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-surface-100 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-surface-900 dark:text-white mb-2",children:0===h.length?"No cards yet":"No matching cards"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:0===h.length?"Start building your collection by adding cards":"Try adjusting your search or filters"}),0===h.length&&(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 items-center justify-center",children:[(0,t.jsx)("button",{onClick:()=>o(!0),className:"bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 text-white px-6 py-3 rounded-xl font-medium transition-all duration-200 shadow-md hover:shadow-lg transform hover:-translate-y-0.5",children:"Browse Cards"}),(0,t.jsx)("button",{className:"bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-800 dark:text-surface-300 px-6 py-3 rounded-xl font-medium transition-colors",children:"Scan Cards"})]})]})}):"card"===l?(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:b.map(e=>{let a=e.card;return a?(0,t.jsxs)(G,{rarity:a.rarity,className:"bg-white dark:bg-surface-800 rounded-xl shadow overflow-hidden hover:shadow-lg transition-all duration-200",children:[(0,t.jsx)("div",{className:"flex justify-center p-4 bg-surface-50 dark:bg-surface-700/50",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(H,{card:a,size:"large",className:"mx-auto"}),(0,t.jsx)("div",{className:"absolute -top-2 -right-2",children:(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${k(e.status)}`,children:"owned"===e.status?"✅":"❤️"})}),e.quantity>1&&(0,t.jsx)("div",{className:"absolute -bottom-2 -right-2",children:(0,t.jsxs)("span",{className:"bg-surface-800 dark:bg-surface-200 text-white dark:text-surface-900 text-xs font-bold px-2 py-1 rounded-full",children:[e.quantity,"x"]})})]})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-3",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",title:a.name,children:a.name}),(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 truncate",children:a.set_name})]}),(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${v(a.game)}`,children:a.game})]}),(0,t.jsxs)("div",{className:"space-y-1 mb-3",children:[a.card_type&&(0,t.jsx)("p",{className:"text-xs text-surface-600 dark:text-surface-400 truncate",title:a.card_type,children:a.card_type}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a.mana_cost&&(0,t.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:["Cost: ",a.mana_cost]}),a.power&&a.toughness&&(0,t.jsxs)("span",{className:"text-xs text-surface-600 dark:text-surface-400",children:[a.power,"/",a.toughness]})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${j(a.rarity)}`,children:a.rarity}),a.current_price&&(0,t.jsxs)("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:["$",a.current_price.toFixed(2)]})]}),e.condition&&"owned"===e.status&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${(e=>{switch(e){case"mint":return"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300";case"near_mint":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300";case"excellent":return"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300";case"good":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300";case"light_played":return"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300";case"played":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300";case"poor":return"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-300";default:return"bg-surface-100 text-surface-800 dark:bg-surface-700 dark:text-surface-300"}})(e.condition)}`,children:e.condition.replace("_"," ").toUpperCase()})}),(0,t.jsx)("button",{onClick:()=>x(e.id),className:"w-full bg-surface-100 dark:bg-surface-700 hover:bg-surface-200 dark:hover:bg-surface-600 text-surface-800 dark:text-surface-300 py-2 px-3 rounded-lg text-sm font-medium transition-colors",children:"Edit Card"})]})]},e.id):null})}):(0,t.jsx)("div",{className:"bg-white dark:bg-surface-800 rounded-xl border border-surface-200 dark:border-surface-700 overflow-hidden",children:(0,t.jsx)("div",{className:"space-y-1",children:b.map(e=>{let a=e.card;return a?(0,t.jsxs)("div",{className:"flex items-center p-4 hover:bg-surface-50 dark:hover:bg-surface-700/50 transition-colors",children:[(0,t.jsx)("div",{className:"w-12 h-16 bg-surface-200 dark:bg-surface-700 rounded-lg flex items-center justify-center flex-shrink-0 mr-4",children:a.image_url?(0,t.jsx)("img",{src:a.image_url,alt:a.name,className:"w-full h-full object-cover rounded-lg"}):(0,t.jsx)("svg",{className:"w-4 h-4 text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"font-semibold text-surface-900 dark:text-white truncate",children:a.name}),(0,t.jsx)("p",{className:"text-sm text-surface-600 dark:text-surface-400 truncate",children:a.set_name}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${v(a.game)}`,children:a.game}),(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${j(a.rarity)}`,children:a.rarity}),(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${k(e.status)}`,children:e.status})]})]}),(0,t.jsxs)("div",{className:"text-right mr-4",children:[(0,t.jsxs)("div",{className:"text-sm font-medium text-surface-900 dark:text-white",children:[e.quantity,"x"]}),a.current_price&&(0,t.jsxs)("div",{className:"text-sm text-green-600 dark:text-green-400",children:["$",(a.current_price*e.quantity).toFixed(2)]})]}),(0,t.jsx)("button",{onClick:()=>x(e.id),className:"p-2 text-surface-400 hover:text-surface-600 dark:hover:text-surface-300 rounded-lg transition-colors",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})})]},e.id):null})})})}),(0,t.jsx)(S,{isOpen:c,onClose:()=>o(!1)}),u&&(0,t.jsx)(_,{isOpen:!!u,onClose:()=>x(null),cardId:u}),(0,t.jsx)(F,{isOpen:d,onClose:()=>m(!1),onCardSelect:e=>{console.log("Selected card from database:",e),m(!1)}})]})},U=e=>{let{onModeSelect:a}=e;return(0,t.jsx)("div",{className:"min-h-screen bg-gray-50 px-4 py-6 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"max-w-md mx-auto sm:max-w-2xl",children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold text-gray-900 mb-3",children:"Card Scanner"}),(0,t.jsx)("p",{className:"text-gray-600 text-sm sm:text-base px-2",children:"Choose your scanning mode to get started"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 mb-8",children:[{id:"add-to-database",title:"Add Cards to Database",description:"Scan new cards and add them to your collections",icon:"\uD83D\uDCDA",color:"bg-blue-500 hover:bg-blue-600 active:bg-blue-700"},{id:"search-collections",title:"Search Collections",description:"Find these cards in your existing collections",icon:"\uD83D\uDD0D",color:"bg-green-500 hover:bg-green-600 active:bg-green-700"},{id:"price-check",title:"Price Check",description:"Get real-time pricing for your cards",icon:"\uD83D\uDCB0",color:"bg-yellow-500 hover:bg-yellow-600 active:bg-yellow-700"},{id:"deck-building",title:"Deck Building",description:"Scan cards directly into a deck with legality checks",icon:"\uD83C\uDFAF",color:"bg-purple-500 hover:bg-purple-600 active:bg-purple-700"}].map(e=>(0,t.jsxs)("button",{onClick:()=>a(e.id),className:`${e.color} text-white rounded-xl shadow-lg transition-all duration-200 hover:shadow-xl transform hover:scale-[1.02] active:scale-[0.98] text-left relative overflow-hidden`,style:{minHeight:"120px"},children:[(0,t.jsxs)("div",{className:"p-6 sm:p-6 h-full flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-start space-x-4 mb-3",children:[(0,t.jsx)("div",{className:"text-3xl sm:text-4xl flex-shrink-0",role:"img","aria-label":e.title,children:e.icon}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("h3",{className:"text-lg sm:text-xl font-semibold leading-tight mb-2",children:e.title})})]}),(0,t.jsx)("p",{className:"text-white/90 text-sm sm:text-base leading-relaxed flex-1",children:e.description})]}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-white/10 to-transparent pointer-events-none"})]},e.id))}),(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-5 sm:p-6",children:[(0,t.jsxs)("div",{className:"flex items-center mb-4",children:[(0,t.jsx)("span",{className:"text-2xl mr-3",role:"img","aria-label":"Tips",children:"\uD83D\uDCA1"}),(0,t.jsx)("h2",{className:"font-semibold text-gray-900 text-lg",children:"Pro Tips"})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full mt-2 flex-shrink-0"}),(0,t.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"Position cards clearly within the camera frame"})]}),(0,t.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full mt-2 flex-shrink-0"}),(0,t.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"Scanner will auto-detect cards after 2-3 seconds"})]}),(0,t.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-purple-500 rounded-full mt-2 flex-shrink-0"}),(0,t.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"You can scan up to 100 cards in a single session"})]}),(0,t.jsxs)("div",{className:"flex items-start space-x-3",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-yellow-500 rounded-full mt-2 flex-shrink-0"}),(0,t.jsx)("p",{className:"text-gray-700 text-sm sm:text-base",children:"Duplicates are allowed and will be tracked separately"})]})]})]}),(0,t.jsx)("div",{className:"h-8 sm:h-4"})]})})},q=e=>{let{isVisible:a,message:r,progress:s,type:n="scanning"}=e;return a?(0,t.jsx)("div",{className:"fixed top-4 left-4 right-4 z-50 animate-slide-down sm:left-1/2 sm:right-auto sm:transform sm:-translate-x-1/2 sm:w-auto sm:min-w-80 sm:max-w-md",children:(0,t.jsx)("div",{className:`${(()=>{switch(n){case"scanning":default:return"bg-blue-600 text-white";case"processing":return"bg-purple-600 text-white";case"success":return"bg-green-600 text-white";case"error":return"bg-red-600 text-white"}})()} rounded-xl shadow-lg px-4 py-3 sm:px-5 sm:py-4`,children:(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"text-lg sm:text-xl flex-shrink-0",role:"img","aria-label":n,children:(()=>{switch(n){case"scanning":default:return"\uD83D\uDCF7";case"processing":return"\uD83E\uDD16";case"success":return"✅";case"error":return"❌"}})()}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-medium text-sm sm:text-base leading-tight",children:r}),void 0!==s&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("div",{className:"w-full bg-white/20 rounded-full h-1.5 sm:h-2",children:(0,t.jsx)("div",{className:"bg-white h-1.5 sm:h-2 rounded-full transition-all duration-300 ease-out",style:{width:`${Math.min(100,Math.max(0,s))}%`}})})})]}),("scanning"===n||"processing"===n)&&(0,t.jsx)("div",{className:"w-5 h-5 sm:w-6 sm:h-6 flex-shrink-0",children:(0,t.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 sm:h-6 sm:w-6 border-2 border-white border-t-transparent"})})]})})}):null};var K=r(5364);class Y{constructor(){this.apiKey=null,this.apiKey=K.env.REACT_APP_OPENAI_API_KEY||null}setApiKey(e){this.apiKey=e}async analyzeCard(e){if(!this.apiKey)throw Error("OpenAI API key not configured");try{let a=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:"gpt-4o-mini",messages:[{role:"user",content:[{type:"text",text:'Analyze this trading card image and extract information. Respond with ONLY valid JSON, no markdown formatting or code blocks:\n\n{"cardName": "exact card name", "setName": "set name if visible", "setCode": "3-4 letter set code if visible", "cardType": "creature, spell, pokemon, etc", "rarity": "common, uncommon, rare, etc", "hp": "HP value for Pokemon", "attacks": ["attack names"], "abilities": ["ability names"], "rawText": "all visible text on the card", "game": "MTG or POKEMON or LORCANA", "confidence": 95}\n\nIMPORTANT: Return ONLY the JSON object, no markdown code blocks. Focus on accuracy, leave fields empty if unclear. For the cardName, use the exact name as printed on the card.'},{type:"image_url",image_url:{url:e,detail:"high"}}]}],max_tokens:1e3,temperature:.1})});if(!a.ok)throw Error(`OpenAI API error: ${a.status} ${a.statusText}`);let r=await a.json(),t=r.choices[0]?.message?.content;if(!t)throw Error("No content received from OpenAI");try{let e=t.trim();e.startsWith("```json")?e=e.replace(/^```json\s*/,"").replace(/\s*```$/,""):e.startsWith("```")&&(e=e.replace(/^```\s*/,"").replace(/\s*```$/,""));let a=JSON.parse(e);return{cardName:a.cardName||"",setName:a.setName||void 0,setCode:a.setCode||void 0,cardType:a.cardType||void 0,rarity:a.rarity||void 0,hp:a.hp||void 0,attacks:a.attacks||[],abilities:a.abilities||[],rawText:a.rawText||t,confidence:a.confidence||85,game:a.game||"UNKNOWN"}}catch(a){console.log("JSON parsing failed, trying text extraction:",a),console.log("Raw content:",t);let e=this.extractDataFromRawResponse(t);return{cardName:e.cardName||"Unknown Card",setName:e.setName,setCode:e.setCode,cardType:e.cardType,rarity:e.rarity,hp:e.hp,attacks:e.attacks||[],abilities:e.abilities||[],rawText:t,confidence:70,game:e.game||"UNKNOWN"}}}catch(e){throw console.error("AI OCR error:",e),Error(`AI OCR failed: ${e.message}`)}}extractCardNameFromText(e){let a=e.split("\n").map(e=>e.trim()).filter(e=>e.length>0);for(let e of a)if(!e.match(/^(card name|name:|the card|this is)/i)&&e.length>3&&e.length<50)return e;return a[0]||"Unknown Card"}extractDataFromRawResponse(e){let a=e.split("\n").map(e=>e.trim()).filter(e=>e.length>0),r="",t="",s="",n="",l="",i=[],c=[];for(let e of a)!(e.startsWith("```")||e.startsWith("#"))&&(e.match(/card\s*name[:−]?\s*(.+)/i)?r=e.replace(/card\s*name[:−]?\s*/i,"").replace(/['"]/g,""):e.match(/name[:−]?\s*(.+)/i)&&!r?r=e.replace(/name[:−]?\s*/i,"").replace(/['"]/g,""):e.match(/set[:−]?\s*(.+)/i)?t=e.replace(/set[:−]?\s*/i,"").replace(/['"]/g,""):e.match(/hp[:−]?\s*(\d+)/i)?l=e.match(/hp[:−]?\s*(\d+)/i)?.[1]||"":e.match(/type[:−]?\s*(.+)/i)?s=e.replace(/type[:−]?\s*/i,"").replace(/['"]/g,""):e.match(/rarity[:−]?\s*(.+)/i)&&(n=e.replace(/rarity[:−]?\s*/i,"").replace(/['"]/g,"")));return r||(r=this.extractCardNameFromText(e)),{cardName:r||"Unknown Card",setName:t||void 0,setCode:void 0,cardType:s||void 0,rarity:n||void 0,hp:l||void 0,attacks:i.length>0?i:void 0,abilities:c.length>0?c:void 0,game:this.detectGameFromText(e)}}detectGameFromText(e){let a=e.toLowerCase();return a.includes("pokemon")||a.includes("hp")||a.includes("evolves")?"POKEMON":a.includes("mana")||a.includes("creature")||a.includes("instant")?"MTG":a.includes("lorcana")||a.includes("ink")?"LORCANA":"UNKNOWN"}}class Q{constructor(e="http://localhost:11434"){this.baseUrl=e}async analyzeCard(e){try{let a=e.split(",")[1],r=await fetch(`${this.baseUrl}/api/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:"llava:latest",prompt:`Analyze this trading card image and extract: +1. Card name (exact spelling) +2. Set name and code +3. Game type (Magic: The Gathering, Pokemon, or Lorcana) +4. All visible text +5. Card type and rarity if visible + +Provide accurate information only. Format as JSON with fields: cardName, setName, setCode, game, cardType, rarity, rawText`,images:[a],stream:!1})});if(!r.ok)throw Error(`Ollama API error: ${r.status}`);let t=(await r.json()).response;try{let e=JSON.parse(t);return{cardName:e.cardName||"",setName:e.setName,setCode:e.setCode,cardType:e.cardType,rarity:e.rarity,rawText:e.rawText||t,confidence:85,game:e.game?.toUpperCase()||"UNKNOWN"}}catch{return{cardName:this.extractCardNameFromText(t),rawText:t,confidence:75,game:this.detectGameFromText(t)}}}catch(e){throw console.error("Ollama OCR error:",e),Error(`Ollama OCR failed: ${e.message}`)}}extractCardNameFromText(e){return e.split("\n").map(e=>e.trim()).filter(e=>e.length>0).find(e=>e.length>3&&e.length<50)||"Unknown Card"}detectGameFromText(e){let a=e.toLowerCase();return a.includes("pokemon")||a.includes("hp")?"POKEMON":a.includes("mana")||a.includes("creature")?"MTG":a.includes("lorcana")?"LORCANA":"UNKNOWN"}}let J=new Y,X=new Q,Z=e=>{let{onCardScanned:a,onError:r,isActive:n,maxQueueSize:l=100}=e,i=(0,s.useRef)(null),c=(0,s.useRef)(null),o=(0,s.useRef)(null),d=(0,s.useRef)(null),m=(0,s.useRef)(0),[u,x]=(0,s.useState)(!1),[h,g]=(0,s.useState)({isScanning:!1,isProcessing:!1,message:"",countdown:0}),[p,f]=(0,s.useState)(0),[b,v]=(0,s.useState)(new Set),[j,y]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{try{let e=localStorage.getItem("openai_api_key"),a=localStorage.getItem("tcg_vault_token");if(a)try{let e=await fetch("/api/user/preferences",{headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let a=await e.json(),r=a.preferences?.ocrSettings?.openai_api_key;if(r){J.setApiKey(r),y(!0),console.log("✅ OCR configured with user preferences API key");return}}}catch(e){console.log("Could not load user preferences, checking localStorage...")}e?(J.setApiKey(e),y(!0),console.log("✅ OCR configured with localStorage API key")):(console.log("❌ No OpenAI API key found. OCR scanning will not work."),y(!1))}catch(e){console.error("Error initializing OCR:",e),y(!1)}})()},[]),(0,s.useEffect)(()=>(n?k():w(),()=>{w()}),[n]),(0,s.useEffect)(()=>{if(!u||!n||!j)return;let e=setInterval(()=>{Date.now()-m.current>5e3&&(()=>{if(h.isProcessing||p>=l)return;d.current&&clearTimeout(d.current),g(e=>({...e,isScanning:!0,message:"Card detected, stabilizing...",countdown:3}));let e=3,a=setInterval(()=>{e--,g(a=>({...a,countdown:e,message:e>0?`Scanning in ${e}...`:"Scanning card..."})),e<=0&&(clearInterval(a),C())},1e3);d.current=setTimeout(()=>{clearInterval(a),C()},3e3)})()},2e3);return()=>{clearInterval(e),d.current&&clearTimeout(d.current)}},[u,n,h.isProcessing,p,l,j]);let k=async()=>{try{let e=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:{ideal:1920},height:{ideal:1080}}});i.current&&(i.current.srcObject=e,o.current=e,i.current.onloadedmetadata=()=>{i.current?.play().then(()=>{x(!0)})})}catch(e){console.error("Camera error:",e),r(`Camera access failed: ${e.message}`)}},w=()=>{o.current&&(o.current.getTracks().forEach(e=>e.stop()),o.current=null),x(!1),g({isScanning:!1,isProcessing:!1,message:"",countdown:0})},N=(0,s.useCallback)(()=>{if(!i.current||!c.current)return null;let e=i.current,a=c.current,r=a.getContext("2d");return r?(a.width=e.videoWidth,a.height=e.videoHeight,r.drawImage(e,0,0,a.width,a.height),a.toDataURL("image/jpeg",.8)):null},[]),C=(0,s.useCallback)(async()=>{if(!h.isProcessing&&!(p>=l)){if(!j){g(e=>({...e,isScanning:!1,isProcessing:!1,message:"OCR not configured - please set up your API key in Settings"})),setTimeout(()=>{g(e=>({...e,message:""}))},4e3);return}g(e=>({...e,isScanning:!1,isProcessing:!0,message:"Processing card with AI...",countdown:0}));try{let e,r=N();if(!r)throw Error("Failed to capture image");try{console.log("\uD83E\uDD16 Trying OpenAI Vision API..."),e=await J.analyzeCard(r),console.log("✅ OpenAI Vision result:",e)}catch(a){console.log("❌ OpenAI failed, trying Ollama:",a);try{e=await X.analyzeCard(r),console.log("✅ Ollama Vision result:",e)}catch(e){throw console.error("❌ All AI OCR methods failed"),Error("AI OCR services unavailable. Please configure OpenAI API key or run Ollama locally.")}}let t=`scan_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,s=(e.cardName||"unknown").toLowerCase().replace(/\s+/g,"");if(b.has(s))g(a=>({...a,isProcessing:!1,message:`Duplicate detected: ${e.cardName||"Unknown Card"}`}));else{v(e=>{let a=new Set(e);if(a.add(s),a.size>10){let e=a.values().next().value;a.delete(e)}return a});let n={id:t,cardData:e,imageDataUrl:r,timestamp:Date.now(),queuePosition:p+1};a(n),f(e=>e+1),m.current=Date.now(),g(a=>({...a,isProcessing:!1,message:`Added: ${e.cardName||"Unknown Card"}`}))}setTimeout(()=>{g(e=>({...e,message:""}))},2e3)}catch(a){console.error("Scan processing error:",a);let e="Scan failed, try again";a.message.includes("OpenAI API key not configured")?e="OpenAI API key not configured - check Settings":a.message.includes("OpenAI API error: 401")?e="Invalid OpenAI API key - check Settings":a.message.includes("OpenAI API error: 429")?e="API rate limit exceeded - wait a moment":a.message.includes("AI OCR services unavailable")&&(e="OCR service unavailable - configure API key"),g(a=>({...a,isProcessing:!1,message:e})),setTimeout(()=>{g(e=>({...e,message:""}))},4e3)}}},[N,a,p,l,b,h.isProcessing,j]);return(0,t.jsxs)("div",{className:"relative px-4 sm:px-0",children:[(0,t.jsx)(q,{isVisible:h.isScanning||h.isProcessing||!!h.message,message:h.message,progress:h.isScanning?(3-h.countdown)/3*100:void 0,type:h.isProcessing?"processing":h.message.includes("Added:")?"success":h.message.includes("not configured")||h.message.includes("unavailable")?"error":"scanning"}),!j&&u&&(0,t.jsx)("div",{className:"mb-4 bg-yellow-50 border border-yellow-200 rounded-xl p-4",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-xl mr-3 flex-shrink-0 mt-0.5",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"font-medium text-yellow-900 text-sm sm:text-base",children:"OCR Not Configured"}),(0,t.jsx)("p",{className:"text-yellow-700 text-sm mt-1",children:"Please configure your OpenAI API key in Settings to enable card scanning."})]})]})}),(0,t.jsxs)("div",{className:"relative bg-black rounded-xl overflow-hidden shadow-lg",children:[(0,t.jsx)("video",{ref:i,autoPlay:!0,playsInline:!0,muted:!0,className:"w-full h-auto object-cover",style:{minHeight:"280px",maxHeight:"calc(100vh - 300px)",aspectRatio:"4/3"}}),u&&(0,t.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[(0,t.jsx)("div",{className:"absolute inset-4 sm:inset-6 border-2 border-white border-dashed rounded-lg flex items-center justify-center",children:(0,t.jsxs)("div",{className:"bg-black bg-opacity-60 text-white px-4 py-3 rounded-xl text-center max-w-xs",children:[(0,t.jsx)("div",{className:"font-medium text-sm sm:text-base mb-1",children:"Position card within this area"}),(0,t.jsx)("div",{className:"text-xs sm:text-sm opacity-90",children:j?"Auto-scan in 2-3 seconds":"Configure OCR in Settings first"})]})}),(0,t.jsxs)("div",{className:"absolute top-3 right-3 sm:top-4 sm:right-4 bg-blue-600 text-white px-3 py-1.5 rounded-full text-xs sm:text-sm font-medium shadow-lg",children:["Queue: ",p,"/",l]}),h.isScanning&&(0,t.jsx)("div",{className:"absolute inset-0 bg-blue-500 bg-opacity-20 border-2 border-blue-500 rounded-xl animate-pulse"}),(0,t.jsx)("div",{className:"absolute bottom-4 left-4 right-4 flex justify-center",children:(0,t.jsx)("div",{className:"bg-black bg-opacity-50 backdrop-blur-sm rounded-full px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center space-x-3 text-white text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),(0,t.jsx)("span",{children:"Live"})]}),h.isScanning&&(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-400 rounded-full animate-pulse"}),(0,t.jsx)("span",{children:"Scanning..."})]})]})})})]}),!u&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-white text-center",children:[(0,t.jsx)("div",{className:"text-4xl sm:text-5xl mb-3",children:"\uD83D\uDCF9"}),(0,t.jsx)("div",{className:"font-medium text-base sm:text-lg",children:"Starting Camera..."}),(0,t.jsx)("div",{className:"text-sm sm:text-base opacity-75 mt-1",children:"Please allow camera access"})]})})]}),(0,t.jsx)("canvas",{ref:c,className:"hidden"}),u&&(0,t.jsxs)("div",{className:"mt-6 text-center",children:[(0,t.jsx)("button",{onClick:()=>{!h.isProcessing&&p=l||!j,className:"w-full sm:w-auto bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white px-8 py-4 sm:px-6 sm:py-3 rounded-xl font-medium transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none text-base sm:text-sm",children:h.isProcessing?(0,t.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-white border-t-transparent"}),(0,t.jsx)("span",{children:"Processing..."})]}):j?(0,t.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,t.jsx)("span",{children:"\uD83D\uDCF7"}),(0,t.jsx)("span",{children:"Manual Scan"})]}):"Configure OCR First"}),!j&&(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 px-4",children:"Go to Settings → OCR to configure your OpenAI API key"})]})]})},ee=e=>{let{cards:a,onRemoveCard:r,onClearQueue:n,onCardSelect:l,selectedCards:i,onViewCard:c}=e,[o,d]=(0,s.useState)(!1),m=(0,s.useCallback)(()=>{let e=!o;d(e),a.forEach(a=>{l(a.id,e)})},[o,a,l]);return 0===a.length?(0,t.jsxs)("div",{className:"text-center py-16 px-4",children:[(0,t.jsx)("div",{className:"text-6xl sm:text-7xl mb-4",children:"\uD83D\uDCF7"}),(0,t.jsx)("h3",{className:"text-xl sm:text-2xl font-semibold text-gray-700 mb-2",children:"Queue is Empty"}),(0,t.jsx)("p",{className:"text-gray-500 text-sm sm:text-base",children:"Scanned cards will appear here"})]}):(0,t.jsxs)("div",{className:"space-y-4 px-4 sm:px-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4",children:[(0,t.jsxs)("h3",{className:"text-lg sm:text-xl font-semibold text-gray-900",children:["Scanned Cards (",a.length,"/100)"]}),(0,t.jsxs)("label",{className:"flex items-center space-x-2 cursor-pointer select-none",children:[(0,t.jsx)("input",{type:"checkbox",checked:o,onChange:m,className:"w-5 h-5 sm:w-4 sm:h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),(0,t.jsx)("span",{className:"text-sm sm:text-sm text-gray-700 font-medium",children:"Select All"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between sm:justify-end gap-2",children:[i.size>0&&(0,t.jsxs)("span",{className:"text-xs sm:text-sm text-gray-600 bg-blue-50 px-3 py-1.5 rounded-full font-medium",children:[i.size," selected"]}),(0,t.jsx)("button",{onClick:n,className:"px-4 py-2 text-sm bg-red-50 text-red-700 rounded-lg hover:bg-red-100 active:bg-red-200 transition-colors font-medium",children:"Clear All"})]})]})}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,t.jsxs)("div",{className:`relative bg-white rounded-xl shadow-sm border-2 transition-all duration-200 hover:shadow-md ${i.has(e.id)?"border-blue-500 bg-blue-50/30":"border-gray-100 hover:border-gray-200"}`,children:[(0,t.jsx)("div",{className:"absolute top-3 left-3 z-10",children:(0,t.jsx)("label",{className:"cursor-pointer",children:(0,t.jsx)("input",{type:"checkbox",checked:i.has(e.id),onChange:a=>l(e.id,a.target.checked),className:"w-5 h-5 text-blue-600 rounded focus:ring-blue-500 focus:ring-2 bg-white shadow-sm"})})}),(0,t.jsx)("button",{onClick:()=>r(e.id),className:"absolute top-3 right-3 z-10 w-8 h-8 bg-red-500 text-white rounded-full text-sm hover:bg-red-600 active:bg-red-700 transition-colors flex items-center justify-center shadow-sm","aria-label":"Remove card",children:"\xd7"}),(0,t.jsx)("div",{className:"aspect-[2.5/3.5] bg-gray-100 cursor-pointer overflow-hidden rounded-t-xl",onClick:()=>c(e),children:(0,t.jsx)("img",{src:e.imageDataUrl,alt:e.cardData.cardName||"Scanned card",className:"w-full h-full object-cover transition-transform duration-200 hover:scale-105"})}),(0,t.jsxs)("div",{className:"p-4 space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900 text-sm leading-tight line-clamp-2",children:e.cardData.cardName||"Unknown Card"}),e.cardData.setName&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 line-clamp-1",children:e.cardData.setName})]}),(0,t.jsx)("div",{className:`px-2 py-1 rounded-full text-xs font-medium text-white flex-shrink-0 ${(e=>e?e>=.9?"bg-green-500":e>=.7?"bg-yellow-500":"bg-red-500":"bg-gray-400")(e.cardData.confidence)}`,children:(e=>e?`${Math.round(100*e)}%`:"Unknown")(e.cardData.confidence)})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[(0,t.jsx)("span",{className:"truncate",children:e.cardData.game||"Unknown Game"}),e.cardData.rarity&&(0,t.jsx)("span",{className:"capitalize flex-shrink-0 ml-2",children:e.cardData.rarity})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-xs text-gray-400",children:["#",e.queuePosition]}),(0,t.jsx)("div",{className:"text-xs text-gray-400",children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})]},e.id))}),(0,t.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 sm:gap-4",children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-900",children:["Total: ",a.length," cards"]}),(0,t.jsxs)("span",{className:"text-sm text-gray-600",children:["Selected: ",i.size]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 sm:gap-4",children:[(0,t.jsxs)("span",{className:"flex items-center space-x-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("div",{className:"w-2.5 h-2.5 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"text-gray-600",children:"High confidence"})]}),(0,t.jsxs)("span",{className:"flex items-center space-x-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("div",{className:"w-2.5 h-2.5 bg-yellow-500 rounded-full"}),(0,t.jsx)("span",{className:"text-gray-600",children:"Medium"})]}),(0,t.jsxs)("span",{className:"flex items-center space-x-1.5 text-xs sm:text-sm",children:[(0,t.jsx)("div",{className:"w-2.5 h-2.5 bg-red-500 rounded-full"}),(0,t.jsx)("span",{className:"text-gray-600",children:"Low"})]})]})]})})]})},ea=e=>{let{selectedCount:a,onAddToCollection:r,onAddToDeck:n,onAddTags:l,onRemoveSelected:i,collections:c,decks:o,isProcessing:d}=e,[m,u]=(0,s.useState)(!1),[x,h]=(0,s.useState)(""),[g,p]=(0,s.useState)(!1),[f,b]=(0,s.useState)(""),[v,j]=(0,s.useState)(!1),[y,k]=(0,s.useState)("");if(0===a)return null;let w=()=>{x.trim()&&(l(x.split(",").map(e=>e.trim()).filter(Boolean)),h(""),u(!1))};return(0,t.jsxs)("div",{className:"bg-white border-t border-gray-200 px-4 py-6 sm:px-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[(0,t.jsxs)("h3",{className:"text-lg sm:text-xl font-semibold text-gray-900",children:["Bulk Operations (",a," selected)"]}),(0,t.jsx)("button",{onClick:i,className:"self-start sm:self-auto px-4 py-2 text-sm bg-red-50 text-red-700 rounded-lg hover:bg-red-100 active:bg-red-200 transition-colors font-medium",disabled:d,children:"Remove Selected"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900 text-base",children:"Add to Collection"}),c.length>0&&(0,t.jsxs)("select",{className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white",onChange:e=>e.target.value&&r(e.target.value),defaultValue:"",disabled:d,children:[(0,t.jsx)("option",{value:"",children:"Select existing collection..."}),c.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]}),g?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("input",{type:"text",value:f,onChange:e=>b(e.target.value),placeholder:"Collection name...",className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:d}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:()=>{f.trim()&&(r("",f.trim()),b(""),p(!1))},className:"flex-1 px-4 py-3 bg-blue-600 text-white rounded-xl text-sm font-medium hover:bg-blue-700 active:bg-blue-800 disabled:bg-gray-400 transition-colors",disabled:!f.trim()||d,children:"Create"}),(0,t.jsx)("button",{onClick:()=>p(!1),className:"px-4 py-3 bg-gray-100 text-gray-700 rounded-xl text-sm font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:d,children:"Cancel"})]})]}):(0,t.jsx)("button",{onClick:()=>p(!0),className:"w-full px-4 py-3 border-2 border-dashed border-gray-300 rounded-xl text-sm text-gray-600 hover:border-blue-400 hover:text-blue-600 active:border-blue-500 transition-colors font-medium",disabled:d,children:"+ Create New Collection"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900 text-base",children:"Add to Deck"}),o.length>0&&(0,t.jsxs)("select",{className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white",onChange:e=>e.target.value&&n(e.target.value),defaultValue:"",disabled:d,children:[(0,t.jsx)("option",{value:"",children:"Select existing deck..."}),o.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]}),v?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("input",{type:"text",value:y,onChange:e=>k(e.target.value),placeholder:"Deck name...",className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:d}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:()=>{y.trim()&&(n("",y.trim()),k(""),j(!1))},className:"flex-1 px-4 py-3 bg-purple-600 text-white rounded-xl text-sm font-medium hover:bg-purple-700 active:bg-purple-800 disabled:bg-gray-400 transition-colors",disabled:!y.trim()||d,children:"Create"}),(0,t.jsx)("button",{onClick:()=>j(!1),className:"px-4 py-3 bg-gray-100 text-gray-700 rounded-xl text-sm font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:d,children:"Cancel"})]})]}):(0,t.jsx)("button",{onClick:()=>j(!0),className:"w-full px-4 py-3 border-2 border-dashed border-gray-300 rounded-xl text-sm text-gray-600 hover:border-purple-400 hover:text-purple-600 active:border-purple-500 transition-colors font-medium",disabled:d,children:"+ Create New Deck"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900 text-base",children:"Add Tags"}),m?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Enter tags (comma-separated)...",className:"w-full px-4 py-3 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:d,onKeyPress:e=>"Enter"===e.key&&w()}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:w,className:"flex-1 px-4 py-3 bg-green-600 text-white rounded-xl text-sm font-medium hover:bg-green-700 active:bg-green-800 disabled:bg-gray-400 transition-colors",disabled:!x.trim()||d,children:"Add Tags"}),(0,t.jsx)("button",{onClick:()=>u(!1),className:"px-4 py-3 bg-gray-100 text-gray-700 rounded-xl text-sm font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:d,children:"Cancel"})]})]}):(0,t.jsx)("button",{onClick:()=>u(!0),className:"w-full px-4 py-3 border-2 border-dashed border-gray-300 rounded-xl text-sm text-gray-600 hover:border-green-400 hover:text-green-600 active:border-green-500 transition-colors font-medium",disabled:d,children:"+ Add Tags"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:"Quick Tags:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:["Foil","Mint","Near Mint","Played","Favorite"].map(e=>(0,t.jsx)("button",{onClick:()=>l([e]),className:"px-3 py-2 bg-gray-100 text-gray-700 rounded-lg text-xs font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors",disabled:d,children:e},e))})]})]})]}),d&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 mt-6 border-t border-gray-100",children:(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent"}),(0,t.jsx)("span",{className:"text-sm text-gray-600 font-medium",children:"Processing..."})]})})]})};class er{static generateTags(e){let a=[],r=[];if(e.game){let t=this.normalizeGame(e.game);a.push(t),r.push(`Game: ${t}`)}if(e.rarity){let t=this.normalizeRarity(e.rarity);a.push(t),r.push(`Rarity: ${t}`),this.isHighValueRarity(e.rarity)&&(a.push("High Value"),r.push("High-value rarity detected"))}if(e.setName){let t=this.generateSetTag(e.setName);t&&(a.push(t),r.push(`Set: ${t}`));let s=this.detectSpecialSets(e.setName);a.push(...s),s.length>0&&r.push(`Special sets: ${s.join(", ")}`)}if(e.cardType){let t=this.normalizeCardType(e.cardType);if(t&&(a.push(t),r.push(`Type: ${t}`)),e.power&&e.toughness){a.push("Creature");let t=this.categorizeCreaturePower(e.power,e.toughness);t&&(a.push(t),r.push(`Power level: ${t}`))}}if(e.manaCost){let t=this.analyzeManaColor(e.manaCost);a.push(...t),t.length>0&&r.push(`Mana colors: ${t.join(", ")}`)}if(e.element){let t=this.normalizeElement(e.element);t&&(a.push(t),r.push(`Element: ${t}`))}if(e.cardName){let t=this.analyzeCardName(e.cardName);a.push(...t),t.length>0&&r.push(`Name analysis: ${t.join(", ")}`)}return{tags:Array.from(new Set(a)).filter(e=>e.length>0),confidence:.8,reasoning:r.join("; ")}}static normalizeGame(e){return({"magic the gathering":"MTG",magic:"MTG",mtg:"MTG",pokemon:"Pokemon",pokémon:"Pokemon",lorcana:"Lorcana","disney lorcana":"Lorcana"})[e.toLowerCase()]||e}static normalizeRarity(e){return({c:"Common",common:"Common",u:"Uncommon",uncommon:"Uncommon",r:"Rare",rare:"Rare",m:"Mythic",mythic:"Mythic","mythic rare":"Mythic",sr:"Super Rare","super rare":"Super Rare","ultra rare":"Ultra Rare","secret rare":"Secret Rare",legendary:"Legendary",enchanted:"Enchanted"})[e.toLowerCase()]||e}static isHighValueRarity(e){return["mythic","super rare","ultra rare","secret rare","legendary","enchanted"].some(a=>e.toLowerCase().includes(a))}static generateSetTag(e){return({"dominaria united":"DMU","brothers war":"BRO","phyrexia all will be one":"ONE","march of the machine":"MOM","battle for zendikar":"BFZ","sword shield":"SWSH","sun moon":"SM","the first chapter":"TFC"})[e.toLowerCase()]||null}static detectSpecialSets(e){let a=[],r=e.toLowerCase();return r.includes("promo")&&a.push("Promo"),r.includes("prerelease")&&a.push("Prerelease"),r.includes("foil")&&a.push("Foil"),r.includes("alternate art")&&a.push("Alt Art"),r.includes("full art")&&a.push("Full Art"),r.includes("borderless")&&a.push("Borderless"),r.includes("showcase")&&a.push("Showcase"),r.includes("collector")&&a.push("Collector"),a}static normalizeCardType(e){let a=e.toLowerCase();for(let[e,r]of Object.entries({creature:"Creature",instant:"Instant",sorcery:"Sorcery",artifact:"Artifact",enchantment:"Enchantment",planeswalker:"Planeswalker",land:"Land","basic land":"Basic Land",legendary:"Legendary"}))if(a.includes(e))return r;return null}static categorizeCreaturePower(e,a){let r=parseInt(e),t=parseInt(a);if(isNaN(r)||isNaN(t))return null;let s=r+t;return s>=10?"High Power":s>=6?"Mid Power":s>=3?"Low Power":"Utility"}static analyzeManaColor(e){let a=[];return(e.includes("W")||e.includes("white"))&&a.push("White"),(e.includes("U")||e.includes("blue"))&&a.push("Blue"),(e.includes("B")||e.includes("black"))&&a.push("Black"),(e.includes("R")||e.includes("red"))&&a.push("Red"),(e.includes("G")||e.includes("green"))&&a.push("Green"),a.length>1?a.push("Multicolor"):0===a.length&&e.match(/\d+/)&&a.push("Colorless"),a}static normalizeElement(e){return({fire:"Fire",water:"Water",grass:"Grass",electric:"Electric",psychic:"Psychic",fighting:"Fighting",darkness:"Dark",metal:"Steel",fairy:"Fairy",dragon:"Dragon",colorless:"Colorless"})[e.toLowerCase()]||e}static analyzeCardName(e){let a=[],r=e.toLowerCase();return(r.includes("legendary")||this.isLegendaryName(r))&&a.push("Legendary"),(r.includes("foil")||r.includes("holo"))&&a.push("Foil"),(r.includes("ex")||r.includes("gx")||r.includes("vmax"))&&a.push("Special"),a}static isLegendaryName(e){return[/\b(jace|chandra|garruk|liliana|ajani|elspeth|vraska|nissa|gideon|teferi)\b/,/\b(pikachu|charizard|mewtwo|mew|rayquaza|arceus)\b/,/\b(mickey|minnie|donald|goofy|elsa|anna|simba)\b/].some(a=>a.test(e))}}let et=()=>{let e=(0,m.Zp)(),[a,r]=(0,s.useState)("mode-selection"),[n,l]=(0,s.useState)(null),[i,c]=(0,s.useState)([]),[o,d]=(0,s.useState)(new Set),[u,x]=(0,s.useState)(!1),[h]=(0,s.useState)([{id:"1",name:"My Collection"},{id:"2",name:"Trade Binder"},{id:"3",name:"Deck Ideas"}]),[g]=(0,s.useState)([{id:"1",name:"Standard Deck"},{id:"2",name:"Commander"},{id:"3",name:"Draft Picks"}]),[p]=(0,s.useState)(new Map);(0,s.useEffect)(()=>()=>{p.forEach(e=>{e.startsWith("blob:")&&URL.revokeObjectURL(e)}),p.clear()},[p]);let f=(0,s.useCallback)(e=>{l(e),r("scanning")},[]),b=(0,s.useCallback)(e=>{let a=er.generateTags(e.cardData),r={...e,autoTags:a.tags};p.set(e.id,e.imageDataUrl),c(e=>[...e,r]),c(e=>e.length>100?(e.slice(0,e.length-100).forEach(e=>{let a=p.get(e.id);a&&a.startsWith("blob:")&&URL.revokeObjectURL(a),p.delete(e.id)}),e.slice(e.length-100)):e)},[p]),v=(0,s.useCallback)(e=>{c(a=>a.filter(a=>a.id!==e)),d(a=>{let r=new Set(a);return r.delete(e),r});let a=p.get(e);a&&a.startsWith("blob:")&&URL.revokeObjectURL(a),p.delete(e)},[p]),j=(0,s.useCallback)(()=>{i.forEach(e=>{let a=p.get(e.id);a&&a.startsWith("blob:")&&URL.revokeObjectURL(a)}),p.clear(),c([]),d(new Set)},[i,p]),y=(0,s.useCallback)((e,a)=>{d(r=>{let t=new Set(r);return a?t.add(e):t.delete(e),t})},[]),k=(0,s.useCallback)(e=>{console.log("Viewing card:",e)},[]),w=(0,s.useCallback)(async(e,a)=>{if(0!==o.size){x(!0);try{console.log("Adding to collection:",{collectionId:e,newCollectionName:a,cards:Array.from(o)}),await new Promise(e=>setTimeout(e,1e3)),alert(`Added ${o.size} cards to ${a||"collection"}`)}catch(e){console.error("Failed to add to collection:",e),alert("Failed to add cards to collection")}finally{x(!1)}}},[o]),N=(0,s.useCallback)(async(e,a)=>{if(0!==o.size){x(!0);try{console.log("Adding to deck:",{deckId:e,newDeckName:a,cards:Array.from(o)}),await new Promise(e=>setTimeout(e,1e3)),alert(`Added ${o.size} cards to ${a||"deck"}`)}catch(e){console.error("Failed to add to deck:",e),alert("Failed to add cards to deck")}finally{x(!1)}}},[o]),C=(0,s.useCallback)(async e=>{if(0!==o.size){x(!0);try{console.log("Adding tags:",{tags:e,cards:Array.from(o)}),await new Promise(e=>setTimeout(e,1e3)),alert(`Added tags "${e.join(", ")}" to ${o.size} cards`)}catch(e){console.error("Failed to add tags:",e),alert("Failed to add tags")}finally{x(!1)}}},[o]),_=(0,s.useCallback)(()=>{o.forEach(e=>v(e))},[o,v]),S=(0,s.useCallback)(async()=>{if(0===i.length)return void e("/scanner");r("processing"),x(!0);try{switch(n){case"add-to-database":console.log("Adding all cards to database:",i);break;case"search-collections":console.log("Searching collections for:",i);break;case"price-check":console.log("Getting prices for:",i);break;case"deck-building":console.log("Adding to deck:",i)}await new Promise(e=>setTimeout(e,2e3)),r("complete"),setTimeout(()=>{e("/scanner")},3e3)}catch(e){console.error("Failed to process cards:",e),alert("Failed to process cards"),r("review")}finally{x(!1)}},[i,n,e]),L=(0,s.useCallback)(()=>{r("scanning")},[]),M=(0,s.useCallback)(()=>{r("review")},[]),A=(0,s.useCallback)(e=>{console.error("Scanner error:",e),alert(e)},[]);return(0,t.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-6",children:(()=>{switch(a){case"mode-selection":return(0,t.jsx)(U,{onModeSelect:f});case"scanning":return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("h2",{className:"text-xl sm:text-2xl font-bold text-gray-900 mb-2",children:["add-to-database"===n&&"\uD83D\uDCDA Adding Cards to Database","search-collections"===n&&"\uD83D\uDD0D Searching Collections","price-check"===n&&"\uD83D\uDCB0 Price Checking Cards","deck-building"===n&&"\uD83C\uDFAF Building Deck"]}),(0,t.jsx)("p",{className:"text-gray-600 text-sm sm:text-base",children:"Position cards clearly within the camera frame"})]}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[i.length>0&&(0,t.jsx)("button",{onClick:M,className:"w-full sm:w-auto bg-green-600 text-white px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-green-700 active:bg-green-800 transition-colors text-sm sm:text-base shadow-lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,t.jsx)("span",{children:"Review Queue"}),(0,t.jsx)("span",{className:"bg-green-700 px-2 py-0.5 rounded-full text-xs",children:i.length})]})}),(0,t.jsx)("button",{onClick:()=>r("mode-selection"),className:"w-full sm:w-auto bg-gray-100 text-gray-700 px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-gray-200 active:bg-gray-300 transition-colors text-sm sm:text-base",children:"Change Mode"})]})]})}),(0,t.jsx)(Z,{onCardScanned:b,onError:A,isActive:"scanning"===a,maxQueueSize:100})]});case"review":return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-4 sm:p-6",children:(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"text-xl sm:text-2xl font-bold text-gray-900 mb-2",children:"Review Scanned Cards"}),(0,t.jsx)("p",{className:"text-gray-600 text-sm sm:text-base",children:"Select cards and choose where to add them"})]}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,t.jsx)("button",{onClick:L,className:"w-full sm:w-auto bg-blue-600 text-white px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-blue-700 active:bg-blue-800 transition-colors text-sm sm:text-base",children:"Continue Scanning"}),(0,t.jsx)("button",{onClick:S,disabled:0===i.length||u,className:"w-full sm:w-auto bg-green-600 text-white px-4 py-3 sm:px-6 sm:py-2 rounded-xl font-medium hover:bg-green-700 active:bg-green-800 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors text-sm sm:text-base shadow-lg",children:u?(0,t.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent"}),(0,t.jsx)("span",{children:"Processing..."})]}):"Finish & Process"})]})]})}),(0,t.jsx)(ee,{cards:i,onRemoveCard:v,onClearQueue:j,onCardSelect:y,selectedCards:o,onViewCard:k}),(0,t.jsx)(ea,{selectedCount:o.size,onAddToCollection:w,onAddToDeck:N,onAddTags:C,onRemoveSelected:_,collections:h,decks:g,isProcessing:u})]});case"processing":return(0,t.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:(0,t.jsxs)("div",{className:"text-center max-w-md mx-auto",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 sm:h-20 sm:w-20 border-4 border-blue-600 border-t-transparent mx-auto mb-6"}),(0,t.jsx)("h3",{className:"text-xl sm:text-2xl font-semibold text-gray-900 mb-3",children:"Processing Cards..."}),(0,t.jsxs)("p",{className:"text-gray-600 text-sm sm:text-base mb-4",children:["Adding ",i.length," cards to your collection"]}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-full h-2 w-full max-w-xs mx-auto",children:(0,t.jsx)("div",{className:"bg-blue-600 h-2 rounded-full animate-pulse",style:{width:"60%"}})})]})});case"complete":return(0,t.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:(0,t.jsxs)("div",{className:"text-center max-w-md mx-auto",children:[(0,t.jsx)("div",{className:"text-6xl sm:text-7xl mb-6",children:"✅"}),(0,t.jsx)("h3",{className:"text-xl sm:text-2xl font-semibold text-green-600 mb-3",children:"Success!"}),(0,t.jsxs)("p",{className:"text-gray-600 text-sm sm:text-base mb-6",children:["Successfully processed ",i.length," cards"]}),(0,t.jsx)("div",{className:"bg-green-50 border border-green-200 rounded-xl p-4 mb-6",children:(0,t.jsx)("p",{className:"text-green-800 text-sm font-medium",children:"\uD83C\uDF89 All cards have been added to your collection!"})}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Redirecting to scanner..."})]})});default:return null}})()})})},es=()=>(0,t.jsx)(et,{}),en=()=>{let{user:e}=(0,c.A)(),[a,r]=(0,s.useState)(null),[n,l]=(0,s.useState)(!0),[i,o]=(0,s.useState)(!1),[d,m]=(0,s.useState)(null),[u,x]=(0,s.useState)("general"),[h,g]=(0,s.useState)(!1),[p,f]=(0,s.useState)(!1),[b,v]=(0,s.useState)({});(0,s.useEffect)(()=>{j()},[e]);let j=async()=>{if(e)try{let e=localStorage.getItem("tcg_vault_token"),a=await fetch("/api/user/preferences",{headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(a.ok){let e=await a.json();r(e.preferences)}else m({type:"error",text:"Failed to load preferences"})}catch(e){console.error("Error loading preferences:",e),m({type:"error",text:"Error loading preferences"})}finally{l(!1)}},y=async()=>{if(a){o(!0);try{let e=localStorage.getItem("tcg_vault_token"),t=await fetch("/api/user/preferences",{method:"PUT",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(a)}),s=await t.json();t.ok?(m({type:"success",text:"Settings saved successfully!"}),r(s.preferences)):m({type:"error",text:s.error||"Failed to save settings"})}catch(e){console.error("Error saving preferences:",e),m({type:"error",text:"Error saving settings"})}finally{o(!1)}}},k=async()=>{if(!a?.ocrSettings.openai_api_key)return void v(e=>({...e,openai:"❌ API key required"}));g(!0);try{let e=await fetch("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a.ocrSettings.openai_api_key}`}});e.ok?v(e=>({...e,openai:"✅ API key valid"})):v(a=>({...a,openai:`❌ API error: ${e.status}`}))}catch(e){v(a=>({...a,openai:`❌ Connection failed: ${e.message}`}))}finally{g(!1)}},w=async()=>{if(a?.ocrSettings.ollama_url){f(!0);try{let e=await fetch(`${a.ocrSettings.ollama_url}/api/tags`);if(e.ok){let a=await e.json();a.models?.some(e=>e.name.includes("llava")||e.name.includes("vision"))?v(e=>({...e,ollama:"✅ Ollama with vision models available"})):v(e=>({...e,ollama:"⚠️ Ollama running but no vision models found"}))}else v(a=>({...a,ollama:`❌ Ollama error: ${e.status}`}))}catch(e){v(a=>({...a,ollama:`❌ Cannot reach Ollama: ${e.message}`}))}finally{f(!1)}}},N=(e,t)=>{a&&r({...a,[e]:t})},C=(e,t)=>{a&&r({...a,ocrSettings:{...a.ocrSettings,[e]:t}})};return n?(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,t.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600"})}):a?(0,t.jsxs)("div",{className:"max-w-4xl mx-auto p-6",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Settings"}),(0,t.jsx)("p",{className:"text-gray-600",children:"Manage your account preferences and OCR configuration"})]}),d&&(0,t.jsx)("div",{className:`mb-6 p-4 rounded-lg ${"success"===d.type?"bg-green-50 text-green-800 border border-green-200":"bg-red-50 text-red-800 border border-red-200"}`,children:d.text}),(0,t.jsx)("div",{className:"border-b border-gray-200 mb-6",children:(0,t.jsx)("nav",{className:"-mb-px flex space-x-8",children:[{id:"general",label:"General",icon:"⚙️"},{id:"ocr",label:"AI OCR",icon:"\uD83E\uDD16"},{id:"privacy",label:"Privacy",icon:"\uD83D\uDD12"}].map(e=>(0,t.jsxs)("button",{onClick:()=>x(e.id),className:`py-2 px-1 border-b-2 font-medium text-sm ${u===e.id?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[(0,t.jsx)("span",{className:"mr-2",children:e.icon}),e.label]},e.id))})}),(0,t.jsxs)("div",{className:"space-y-6",children:["general"===u&&(0,t.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[(0,t.jsx)("h3",{className:"text-lg font-medium mb-4",children:"General Preferences"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Default View"}),(0,t.jsxs)("select",{value:a.defaultView,onChange:e=>N("defaultView",e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500",children:[(0,t.jsx)("option",{value:"card",children:"Card View"}),(0,t.jsx)("option",{value:"table",children:"Table View"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Items per Page"}),(0,t.jsxs)("select",{value:a.itemsPerPage,onChange:e=>N("itemsPerPage",parseInt(e.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500",children:[(0,t.jsx)("option",{value:10,children:"10"}),(0,t.jsx)("option",{value:20,children:"20"}),(0,t.jsx)("option",{value:50,children:"50"}),(0,t.jsx)("option",{value:100,children:"100"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Theme"}),(0,t.jsxs)("select",{value:a.theme,onChange:e=>N("theme",e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500",children:[(0,t.jsx)("option",{value:"light",children:"Light"}),(0,t.jsx)("option",{value:"dark",children:"Dark"}),(0,t.jsx)("option",{value:"system",children:"System"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.enableAnimations,onChange:e=>N("enableAnimations",e.target.checked),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Enable animations"})]}),(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.enableOcr,onChange:e=>N("enableOcr",e.target.checked),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Enable OCR scanning"})]})]})]})]}),"ocr"===u&&(0,t.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[(0,t.jsx)("h3",{className:"text-lg font-medium mb-4",children:"AI OCR Configuration"}),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-3",children:"Preferred OCR Service"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"radio",value:"openai",checked:"openai"===a.ocrSettings.preferred_service,onChange:e=>C("preferred_service",e.target.value),className:"text-indigo-600 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"OpenAI Vision API (Recommended)"})]}),(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"radio",value:"ollama",checked:"ollama"===a.ocrSettings.preferred_service,onChange:e=>C("preferred_service",e.target.value),className:"text-indigo-600 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Ollama (Local/Private)"})]})]})]}),(0,t.jsxs)("div",{className:"border rounded-lg p-4 mb-6",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900 mb-3",children:"OpenAI Configuration"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"API Key"}),(0,t.jsx)("input",{type:"password",value:a.ocrSettings.openai_api_key,onChange:e=>C("openai_api_key",e.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["Get your API key from"," ",(0,t.jsx)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-indigo-600 hover:underline",children:"OpenAI Platform"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:k,disabled:h||!a.ocrSettings.openai_api_key,className:"bg-blue-600 text-white px-3 py-1 rounded text-sm disabled:bg-gray-400 hover:bg-blue-700",children:h?"Testing...":"Test API Key"}),b.openai&&(0,t.jsx)("span",{className:"text-sm",children:b.openai})]})]})]}),(0,t.jsxs)("div",{className:"border rounded-lg p-4 mb-6",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900 mb-3",children:"Ollama Configuration"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Ollama URL"}),(0,t.jsx)("input",{type:"text",value:a.ocrSettings.ollama_url,onChange:e=>C("ollama_url",e.target.value),placeholder:"http://localhost:11434",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["Requires LLaVA or similar vision model:"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"ollama pull llava"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:w,disabled:p,className:"bg-green-600 text-white px-3 py-1 rounded text-sm disabled:bg-gray-400 hover:bg-green-700",children:p?"Testing...":"Test Ollama"}),b.ollama&&(0,t.jsx)("span",{className:"text-sm",children:b.ollama})]})]})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Confidence Threshold (",a.ocrSettings.confidence_threshold,"%)"]}),(0,t.jsx)("input",{type:"range",min:"0",max:"100",value:a.ocrSettings.confidence_threshold,onChange:e=>C("confidence_threshold",parseInt(e.target.value)),className:"w-full"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Minimum confidence required to accept OCR results"})]}),(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.ocrSettings.auto_add_to_collection,onChange:e=>C("auto_add_to_collection",e.target.checked),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Automatically add scanned cards to selected collection"})]})]})]}),"privacy"===u&&(0,t.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[(0,t.jsx)("h3",{className:"text-lg font-medium mb-4",children:"Privacy Settings"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.privacySettings.collections_public,onChange:e=>N("privacySettings",{...a.privacySettings,collections_public:e.target.checked}),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Make collections public by default"})]}),(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.privacySettings.decks_public,onChange:e=>N("privacySettings",{...a.privacySettings,decks_public:e.target.checked}),className:"rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Make decks public by default"})]})]})]})]}),(0,t.jsx)("div",{className:"mt-8 flex justify-end",children:(0,t.jsxs)("button",{onClick:y,disabled:i,className:"bg-indigo-600 text-white px-6 py-2 rounded-lg hover:bg-indigo-700 disabled:bg-gray-400 flex items-center gap-2",children:[i&&(0,t.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),i?"Saving...":"Save Settings"]})})]}):(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load preferences"}),(0,t.jsx)("button",{onClick:j,className:"mt-4 text-indigo-600 hover:underline",children:"Try Again"})]})},el=()=>{let{login:e}=(0,c.A)(),[a,r]=(0,s.useState)({email:"",password:""}),[n,l]=(0,s.useState)(!1),[i,o]=(0,s.useState)(null),[d,m]=(0,s.useState)(!1),x=async r=>{r.preventDefault(),l(!0),o(null);try{await e(a.email,a.password)}catch(e){o(e instanceof Error?e.message:"Login failed")}finally{l(!1)}},h=e=>{r(a=>({...a,[e.target.name]:e.target.value}))};return(0,t.jsxs)("div",{className:"bg-white dark:bg-surface-800 p-8 rounded-2xl shadow-xl border border-surface-200 dark:border-surface-700 transition-colors",children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-gradient-to-r from-primary-500 to-accent-500 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-lg",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white mb-2",children:"Welcome Back"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:"Sign in to your TCG Vault"})]}),i&&(0,t.jsx)("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-red-500 mr-2",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),(0,t.jsx)("span",{className:"text-red-700 dark:text-red-400 text-sm",children:i})]})}),(0,t.jsxs)("form",{onSubmit:x,className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Email Address"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:"email",id:"email",name:"email",value:a.email,onChange:h,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"Enter your email",required:!0}),(0,t.jsx)("svg",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:d?"text":"password",id:"password",name:"password",value:a.password,onChange:h,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors pr-12",placeholder:"Enter your password",required:!0}),(0,t.jsx)("button",{type:"button",onClick:()=>m(!d),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-400 dark:text-surface-500 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:d?(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.878 9.878L3 3m6.878 6.878L21 21"})}):(0,t.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,t.jsx)("button",{type:"submit",disabled:n,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-3 px-4 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:n?(0,t.jsxs)("div",{className:"flex items-center justify-center",children:[(0,t.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Signing In..."]}):"Sign In"}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsxs)("p",{className:"text-surface-600 dark:text-surface-400",children:["Don't have an account?"," ",(0,t.jsx)(u.N_,{to:"/register",className:"text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-medium transition-colors",children:"Sign up"})]})})]})]})},ei=()=>{let{register:e}=(0,c.A)(),[a,r]=(0,s.useState)({firstName:"",lastName:"",username:"",email:"",password:"",confirmPassword:""}),[n,l]=(0,s.useState)(!1),[i,o]=(0,s.useState)(null),[d,m]=(0,s.useState)(!1),[x,h]=(0,s.useState)(!1),g=async r=>{if(r.preventDefault(),l(!0),o(null),a.password!==a.confirmPassword){o("Passwords do not match"),l(!1);return}try{await e(a)}catch(e){o(e instanceof Error?e.message:"Registration failed")}finally{l(!1)}},p=e=>{r(a=>({...a,[e.target.name]:e.target.value}))};return(0,t.jsxs)("div",{className:"bg-white dark:bg-surface-800 p-8 rounded-2xl shadow-xl border border-surface-200 dark:border-surface-700 transition-colors",children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-gradient-to-r from-primary-500 to-accent-500 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-lg",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white mb-2",children:"Join TCG Vault"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400",children:"Create your account to get started"})]}),i&&(0,t.jsx)("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-red-500 mr-2",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),(0,t.jsx)("span",{className:"text-red-700 dark:text-red-400 text-sm",children:i})]})}),(0,t.jsxs)("form",{onSubmit:g,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"firstName",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"First Name"}),(0,t.jsx)("input",{type:"text",id:"firstName",name:"firstName",value:a.firstName,onChange:p,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"John",required:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"lastName",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Last Name"}),(0,t.jsx)("input",{type:"text",id:"lastName",name:"lastName",value:a.lastName,onChange:p,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"Doe",required:!0})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Username"}),(0,t.jsx)("input",{type:"text",id:"username",name:"username",value:a.username,onChange:p,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"johndoe",required:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Email Address"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:"email",id:"email",name:"email",value:a.email,onChange:p,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors",placeholder:"john@example.com",required:!0}),(0,t.jsx)("svg",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-surface-400 dark:text-surface-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:d?"text":"password",id:"password",name:"password",value:a.password,onChange:p,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors pr-12",placeholder:"Create a strong password",required:!0}),(0,t.jsx)("button",{type:"button",onClick:()=>m(!d),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-400 dark:text-surface-500 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:d?(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.878 9.878L3 3m6.878 6.878L21 21"})}):(0,t.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-surface-700 dark:text-surface-300 mb-2",children:"Confirm Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:x?"text":"password",id:"confirmPassword",name:"confirmPassword",value:a.confirmPassword,onChange:p,className:"w-full px-4 py-3 bg-surface-50 dark:bg-surface-700 border border-surface-300 dark:border-surface-600 rounded-xl text-surface-900 dark:text-white placeholder-surface-500 dark:placeholder-surface-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent transition-colors pr-12",placeholder:"Confirm your password",required:!0}),(0,t.jsx)("button",{type:"button",onClick:()=>h(!x),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-surface-400 dark:text-surface-500 hover:text-surface-600 dark:hover:text-surface-300 transition-colors",children:x?(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.878 9.878L3 3m6.878 6.878L21 21"})}):(0,t.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})]})]}),(0,t.jsx)("button",{type:"submit",disabled:n,className:"w-full bg-gradient-to-r from-primary-500 to-accent-500 hover:from-primary-600 hover:to-accent-600 disabled:from-surface-400 disabled:to-surface-400 text-white font-semibold py-3 px-4 rounded-xl transition-all duration-200 shadow-lg hover:shadow-xl disabled:shadow-none transform hover:-translate-y-0.5 disabled:transform-none",children:n?(0,t.jsxs)("div",{className:"flex items-center justify-center",children:[(0,t.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Creating Account..."]}):"Create Account"}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsxs)("p",{className:"text-surface-600 dark:text-surface-400",children:["Already have an account?"," ",(0,t.jsx)(u.N_,{to:"/login",className:"text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-medium transition-colors",children:"Sign in"})]})})]})]})},ec=()=>{let{token:e}=(0,c.A)(),[a,r]=(0,s.useState)([]),[n,l]=(0,s.useState)(!0),[i,o]=(0,s.useState)(""),[d,m]=(0,s.useState)(""),[u,x]=(0,s.useState)(1),[h,g]=(0,s.useState)(1),[p,f]=(0,s.useState)(null),b=async function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{l(!0);let s=await fetch(`/api/admin/users?page=${a}&limit=20&search=${encodeURIComponent(t)}`,{headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok)throw Error("Failed to fetch users");let n=await s.json();r(n.users),x(n.pagination.page),g(n.pagination.totalPages),o("")}catch(e){o(e.message)}finally{l(!1)}};(0,s.useEffect)(()=>{b(u,d)},[u,e]);let v=async(a,r)=>{try{if(!(await fetch(`/api/admin/users?id=${a}`,{method:"PUT",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)})).ok)throw Error("Failed to update user");b(u,d),f(null)}catch(e){o(e.message)}},j=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return n&&0===a.length?(0,t.jsx)("div",{className:"p-6 flex justify-center items-center",children:(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600"})}):(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"User Management"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Manage user accounts, roles, and permissions."})]}),(0,t.jsx)("form",{onSubmit:e=>{e.preventDefault(),x(1),b(1,d)},className:"mb-6",children:(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("input",{type:"text",placeholder:"Search users by username, email, or name...",value:d,onChange:e=>m(e.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"})}),(0,t.jsx)("button",{type:"submit",className:"px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:"Search"})]})}),i&&(0,t.jsx)("div",{className:"mb-4 bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-lg",children:i}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,t.jsx)("thead",{className:"bg-gray-50",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"User"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Roles"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Login"}),(0,t.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),(0,t.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:a.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:e.first_name||e.last_name?`${e.first_name||""} ${e.last_name||""}`.trim():e.username}),(0,t.jsx)("div",{className:"text-sm text-gray-500",children:e.email}),(e.first_name||e.last_name)&&(0,t.jsxs)("div",{className:"text-xs text-gray-400",children:["@",e.username]})]})}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:e.roles.map(e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${(e=>{switch(e){case"admin":return"bg-purple-100 text-purple-800";case"user":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}})(e)}`,children:e},e))})}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,t.jsx)("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${e.is_active?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:e.is_active?"Active":"Inactive"})}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:j(e.created_at)}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:e.last_login?j(e.last_login):"Never"}),(0,t.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>f(e),className:"text-indigo-600 hover:text-indigo-900",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>v(e.id,{isActive:!e.is_active}),className:e.is_active?"text-red-600 hover:text-red-900":"text-green-600 hover:text-green-900",children:e.is_active?"Deactivate":"Activate"})]})})]},e.id))})]})}),h>1&&(0,t.jsx)("div",{className:"mt-6 flex justify-center",children:(0,t.jsxs)("nav",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>x(Math.max(1,u-1)),disabled:1===u,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50",children:"Previous"}),(0,t.jsxs)("span",{className:"px-3 py-2 text-sm",children:["Page ",u," of ",h]}),(0,t.jsx)("button",{onClick:()=>x(Math.min(h,u+1)),disabled:u===h,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50",children:"Next"})]})}),p&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Edit User"}),(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:"Roles"}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:["user","admin"].map(e=>(0,t.jsxs)("label",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",checked:p.roles.includes(e),onChange:a=>{let r=a.target.checked?[...p.roles,e]:p.roles.filter(a=>a!==e);f({...p,roles:r})},className:"mr-2"}),(0,t.jsx)("span",{className:"capitalize",children:e})]},e))})]})}),(0,t.jsxs)("div",{className:"mt-6 flex justify-end space-x-3",children:[(0,t.jsx)("button",{onClick:()=>f(null),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200",children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>v(p.id,{roles:p.roles}),className:"px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700",children:"Save Changes"})]})]})})]})},eo=()=>(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"System Dashboard"}),(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Overview of system statistics and health."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[(0,t.jsx)("div",{className:"bg-gradient-to-r from-blue-500 to-blue-600 rounded-lg p-6 text-white",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-blue-100 text-sm",children:"Total Users"}),(0,t.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,t.jsx)("div",{className:"bg-blue-400 bg-opacity-30 rounded-full p-3",children:(0,t.jsx)("svg",{className:"w-8 h-8",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"})})})]})}),(0,t.jsx)("div",{className:"bg-gradient-to-r from-green-500 to-green-600 rounded-lg p-6 text-white",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-green-100 text-sm",children:"Total Cards"}),(0,t.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,t.jsx)("div",{className:"bg-green-400 bg-opacity-30 rounded-full p-3",children:(0,t.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})})]})}),(0,t.jsx)("div",{className:"bg-gradient-to-r from-purple-500 to-purple-600 rounded-lg p-6 text-white",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-purple-100 text-sm",children:"Active Sessions"}),(0,t.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,t.jsx)("div",{className:"bg-purple-400 bg-opacity-30 rounded-full p-3",children:(0,t.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})})]})}),(0,t.jsx)("div",{className:"bg-gradient-to-r from-orange-500 to-orange-600 rounded-lg p-6 text-white",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-orange-100 text-sm",children:"Collections"}),(0,t.jsx)("p",{className:"text-3xl font-bold",children:"-"})]}),(0,t.jsx)("div",{className:"bg-orange-400 bg-opacity-30 rounded-full p-3",children:(0,t.jsx)("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})})]})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",children:[(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"System Health"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Database Status"}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"● Online"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"API Status"}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"● Operational"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Storage"}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"● 75% Used"})]})]})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Recent Activity"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"bg-blue-100 rounded-full p-1 mr-3 mt-0.5",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0z"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-gray-900",children:"New user registration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"2 minutes ago"})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"bg-green-100 rounded-full p-1 mr-3 mt-0.5",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-gray-900",children:"Card database updated"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"15 minutes ago"})]})]}),(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"bg-purple-100 rounded-full p-1 mr-3 mt-0.5",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-purple-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-gray-900",children:"System backup completed"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"1 hour ago"})]})]})]})]})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,t.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,t.jsx)("div",{className:"text-indigo-600 mb-2",children:(0,t.jsx)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),(0,t.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Add User"})]}),(0,t.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,t.jsx)("div",{className:"text-green-600 mb-2",children:(0,t.jsx)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}),(0,t.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Import Cards"})]}),(0,t.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,t.jsx)("div",{className:"text-orange-600 mb-2",children:(0,t.jsx)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),(0,t.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"View Reports"})]}),(0,t.jsxs)("button",{className:"p-4 text-center border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors",children:[(0,t.jsx)("div",{className:"text-red-600 mb-2",children:(0,t.jsxs)("svg",{className:"w-8 h-8 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,t.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Settings"})]})]})]})]}),ed=()=>{let{user:e,token:a}=(0,c.A)(),[r,n]=(0,s.useState)({}),[l,i]=(0,s.useState)(!1),[o,d]=(0,s.useState)({}),[m,u]=(0,s.useState)("ALL"),[x,h]=(0,s.useState)(""),g=async()=>{try{let e=await fetch("https://tcg-vault.vercel.app/api/admin?action=card-counts",{headers:{Authorization:`Bearer ${a}`}});if(e.ok){let a=await e.json();n(a.counts||{})}}catch(e){console.error("Error fetching card counts:",e)}};(0,s.useEffect)(()=>{g()},[]);let p=async e=>{i(!0),h(`Loading ${e} cards...`),d({});try{let r=await fetch("https://tcg-vault.vercel.app/api/admin?action=load-cards",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({game:e})});if(r.ok){let e=await r.json();d(e.results||{}),h(`Successfully loaded cards! ${e.message}`),setTimeout(()=>{g()},1e3)}else{let e=await r.json();h(`Error loading cards: ${e.error}`)}}catch(e){console.error("Error loading cards:",e),h("Error loading cards. Please try again.")}finally{i(!1)}};return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-md p-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Card Database Loader"}),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-3",children:"Current Database Status"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,t.jsxs)("div",{className:"bg-blue-50 p-4 rounded-lg",children:[(0,t.jsx)("div",{className:"text-2xl font-bold text-blue-600",children:r.MTG||0}),(0,t.jsx)("div",{className:"text-sm text-blue-500",children:"MTG Cards"})]}),(0,t.jsxs)("div",{className:"bg-yellow-50 p-4 rounded-lg",children:[(0,t.jsx)("div",{className:"text-2xl font-bold text-yellow-600",children:r.POKEMON||0}),(0,t.jsx)("div",{className:"text-sm text-yellow-500",children:"Pok\xe9mon Cards"})]}),(0,t.jsxs)("div",{className:"bg-purple-50 p-4 rounded-lg",children:[(0,t.jsx)("div",{className:"text-2xl font-bold text-purple-600",children:r.LORCANA||0}),(0,t.jsx)("div",{className:"text-sm text-purple-500",children:"Lorcana Cards"})]}),(0,t.jsxs)("div",{className:"bg-green-50 p-4 rounded-lg",children:[(0,t.jsx)("div",{className:"text-2xl font-bold text-green-600",children:r.total||0}),(0,t.jsx)("div",{className:"text-sm text-green-500",children:"Total Cards"})]})]})]}),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-3",children:"Load Cards from External APIs"}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 mb-4",children:[(0,t.jsxs)("select",{value:m,onChange:e=>u(e.target.value),className:"px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[(0,t.jsx)("option",{value:"ALL",children:"All Games (MTG, Pok\xe9mon, Lorcana)"}),(0,t.jsx)("option",{value:"MTG",children:"Magic: The Gathering"}),(0,t.jsx)("option",{value:"POKEMON",children:"Pok\xe9mon"}),(0,t.jsx)("option",{value:"LORCANA",children:"Disney Lorcana"})]}),(0,t.jsx)("button",{onClick:()=>{p(m)},disabled:l,className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors",children:l?"Loading...":"Load Cards"})]}),Object.keys(o).length>0&&(0,t.jsxs)("div",{className:"bg-gray-50 p-4 rounded-lg",children:[(0,t.jsx)("h4",{className:"font-semibold text-gray-700 mb-2",children:"Loading Results:"}),(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==o.mtg&&(0,t.jsxs)("div",{className:"text-blue-600",children:["MTG: ",o.mtg," cards loaded"]}),void 0!==o.pokemon&&(0,t.jsxs)("div",{className:"text-yellow-600",children:["Pok\xe9mon: ",o.pokemon," cards loaded"]}),void 0!==o.lorcana&&(0,t.jsxs)("div",{className:"text-purple-600",children:["Lorcana: ",o.lorcana," cards loaded"]})]})]}),x&&(0,t.jsx)("div",{className:`mt-4 p-3 rounded-lg ${x.includes("Error")?"bg-red-50 text-red-700 border border-red-200":"bg-green-50 text-green-700 border border-green-200"}`,children:x})]}),(0,t.jsxs)("div",{className:"bg-gray-50 p-4 rounded-lg",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-2",children:"Instructions"}),(0,t.jsxs)("ul",{className:"text-sm text-gray-600 space-y-1",children:[(0,t.jsx)("li",{children:"• This will load cards from external APIs into your database"}),(0,t.jsx)("li",{children:"• MTG cards come from Scryfall API"}),(0,t.jsx)("li",{children:"• Pok\xe9mon cards come from Pok\xe9mon TCG API"}),(0,t.jsx)("li",{children:"• Lorcana cards come from Lorcana API and Lorcast API"}),(0,t.jsx)("li",{children:"• Loading may take several minutes for large datasets"}),(0,t.jsx)("li",{children:"• Cards are deduplicated automatically"})]})]})]})},em=()=>{let{user:e,isAdmin:a}=(0,c.A)(),[r,n]=(0,s.useState)("dashboard");return a()?(0,t.jsxs)("div",{className:"min-h-screen bg-gray-50",children:[(0,t.jsx)("div",{className:"bg-white shadow-sm border-b border-gray-200",children:(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"flex justify-between items-center py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Admin Panel"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Welcome back, ",e?.firstName||e?.username]})]}),(0,t.jsx)("div",{className:"flex items-center space-x-4",children:(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:"Admin"})})]})})}),(0,t.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row gap-8",children:[(0,t.jsxs)("div",{className:"lg:w-64 flex-shrink-0",children:[(0,t.jsxs)("nav",{className:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden",children:[(0,t.jsx)("div",{className:"p-4 bg-gray-50 border-b border-gray-200",children:(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-900 uppercase tracking-wide",children:"Administration"})}),(0,t.jsx)("div",{className:"p-2",children:[{id:"dashboard",name:"Dashboard",icon:"\uD83D\uDCCA"},{id:"users",name:"Users",icon:"\uD83D\uDC65"},{id:"cards",name:"Cards",icon:"\uD83C\uDCCF"},{id:"decks",name:"Decks",icon:"\uD83D\uDCDA"},{id:"settings",name:"Settings",icon:"⚙️"}].map(e=>(0,t.jsxs)("button",{onClick:()=>n(e.id),className:`w-full flex items-center px-3 py-2 text-sm font-medium rounded-md mb-1 transition-colors duration-200 ${r===e.id?"bg-indigo-100 text-indigo-700 border-r-2 border-indigo-500":"text-gray-600 hover:bg-gray-50 hover:text-gray-900"}`,children:[(0,t.jsx)("span",{className:"mr-3 text-lg",children:e.icon}),e.name]},e.id))})]}),(0,t.jsxs)("div",{className:"mt-6 bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Quick Stats"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"Total Users"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"-"})]}),(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"Total Cards"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"-"})]}),(0,t.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"Active Sessions"}),(0,t.jsx)("span",{className:"font-medium text-gray-900",children:"-"})]})]})]})]}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 min-h-[600px]",children:(()=>{switch(r){case"dashboard":default:return(0,t.jsx)(eo,{});case"users":return(0,t.jsx)(ec,{});case"cards":return(0,t.jsx)(ed,{});case"decks":return(0,t.jsx)("div",{className:"p-6",children:"Deck Management - Coming Soon"});case"settings":return(0,t.jsx)("div",{className:"p-6",children:"System Settings - Coming Soon"})}})()})})]})})]}):(0,t.jsx)(m.C5,{to:"/dashboard",replace:!0})},eu=e=>{let{children:a}=e,{user:r,isLoading:s}=(0,c.A)(),l=(0,n.useRouter)();return s?(0,t.jsx)("div",{className:"min-h-screen-safe flex items-center justify-center bg-white dark:bg-surface-900",children:(0,t.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center animate-bounce-subtle",children:(0,t.jsx)("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading TCG Vault..."})]})}):r?(0,t.jsx)(t.Fragment,{children:a}):(l.push("/login"),null)},ex=e=>{let{children:a}=e,{user:r,isLoading:s}=(0,c.A)(),l=(0,n.useRouter)();return s?(0,t.jsx)("div",{className:"min-h-screen-safe flex items-center justify-center bg-white dark:bg-surface-900",children:(0,t.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-gradient-to-r from-primary-500 to-accent-500 rounded-xl flex items-center justify-center animate-bounce-subtle",children:(0,t.jsx)("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 text-sm",children:"Loading TCG Vault..."})]})}):r?(l.push("/dashboard"),null):(0,t.jsx)(t.Fragment,{children:a})},eh=e=>{let{children:a}=e;return(0,t.jsx)(x,{children:a})},eg=e=>{let{children:a}=e;return(0,t.jsx)("div",{className:"min-h-screen-safe bg-gradient-to-br from-primary-50 via-white to-accent-50 dark:from-surface-900 dark:via-surface-800 dark:to-surface-900 flex items-center justify-center px-4 transition-colors",children:(0,t.jsx)("div",{className:"w-full max-w-sm animate-slide-up",children:a})})},ep=function(){let e=(0,n.useRouter)(),{pathname:a}=e;return(0,t.jsxs)(d,{children:["/login"===a&&(0,t.jsx)(ex,{children:(0,t.jsx)(eg,{children:(0,t.jsx)(el,{})})}),"/register"===a&&(0,t.jsx)(ex,{children:(0,t.jsx)(eg,{children:(0,t.jsx)(ei,{})})}),"/dashboard"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(h,{})})}),"/collections"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(w,{})})}),"/decks"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(C,{})})}),"/cards"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(W,{})})}),"/scanner"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(es,{})})}),"/settings"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(en,{})})}),"/admin"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(em,{})})}),"/"===a&&(0,t.jsx)(eu,{children:(0,t.jsx)(eh,{children:(0,t.jsx)(h,{})})}),!["/login","/register","/dashboard","/collections","/decks","/cards","/scanner","/settings","/admin","/"].includes(a)&&(0,t.jsx)(eh,{children:(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-surface-200 dark:bg-surface-700 rounded-2xl flex items-center justify-center mx-auto mb-6",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-surface-500 dark:text-surface-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,t.jsx)("h1",{className:"text-2xl font-bold text-surface-900 dark:text-white mb-2",children:"Page Not Found"}),(0,t.jsx)("p",{className:"text-surface-600 dark:text-surface-400 mb-6",children:"The page you're looking for doesn't exist."}),(0,t.jsx)("button",{onClick:()=>e.back(),className:"bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-xl font-medium transition-colors",children:"Go Back"})]})}),(0,t.jsx)(l.j,{}),(0,t.jsx)(i.b,{})]})}}}]); \ No newline at end of file diff --git a/.next/static/chunks/framework-f75312fc4004b783.js b/.next/static/chunks/framework-f75312fc4004b783.js new file mode 100644 index 0000000..2db2656 --- /dev/null +++ b/.next/static/chunks/framework-f75312fc4004b783.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[593],{1733:(e,n)=>{var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function v(e,n,t){this.props=e,this.context=n,this.refs=g,this.updater=t||m}function y(){}function b(e,n,t){this.props=e,this.context=n,this.refs=g,this.updater=t||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,n){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var k=b.prototype=new y;k.constructor=b,h(k,v.prototype),k.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,x={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function _(e,n,r){var l,a={},u=null,o=null;if(null!=n)for(l in void 0!==n.ref&&(o=n.ref),void 0!==n.key&&(u=""+n.key),n)S.call(n,l)&&!E.hasOwnProperty(l)&&(a[l]=n[l]);var i=arguments.length-2;if(1===i)a.children=r;else if(1{function t(e,n){var t=e.length;for(e.push(n);0>>1,l=e[r];if(0>>1;ra(i,t))sa(c,i)?(e[r]=c,e[s]=t,r=s):(e[r]=i,e[o]=t,r=o);else if(sa(c,t))e[r]=c,e[s]=t,r=s;else break}}return n}function a(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if("object"==typeof performance&&"function"==typeof performance.now){var u,o=performance;n.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();n.unstable_now=function(){return i.now()-s}}var c=[],f=[],d=1,p=null,m=3,h=!1,g=!1,v=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,k="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var n=r(f);null!==n;){if(null===n.callback)l(f);else if(n.startTime<=e)l(f),n.sortIndex=n.expirationTime,t(c,n);else break;n=r(f)}}function S(e){if(v=!1,w(e),!g)if(null!==r(c))g=!0,M(x);else{var n=r(f);null!==n&&F(S,n.startTime-e)}}function x(e,t){g=!1,v&&(v=!1,b(C),C=-1),h=!0;var a=m;try{for(w(t),p=r(c);null!==p&&(!(p.expirationTime>t)||e&&!z());){var u=p.callback;if("function"==typeof u){p.callback=null,m=p.priorityLevel;var o=u(p.expirationTime<=t);t=n.unstable_now(),"function"==typeof o?p.callback=o:p===r(c)&&l(c),w(t)}else l(c);p=r(c)}if(null!==p)var i=!0;else{var s=r(f);null!==s&&F(S,s.startTime-t),i=!1}return i}finally{p=null,m=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E=!1,_=null,C=-1,P=5,N=-1;function z(){return!(n.unstable_now()-Ne||125u?(e.sortIndex=a,t(f,e),null===r(c)&&e===r(f)&&(v?(b(C),C=-1):v=!0,F(S,a-u))):(e.sortIndex=o,t(c,e),g||h||(g=!0,M(x))),e},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(e){var n=m;return function(){var t=m;m=n;try{return e.apply(this,arguments)}finally{m=t}}}},2786:(e,n,t)=>{e.exports=t(1869)},4232:(e,n,t)=>{e.exports=t(1733)},5549:(e,n,t)=>{var r,l,a,u,o,i,s=t(4232),c=t(2786);function f(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t