diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/icons.js.map b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/icons.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2fdfd31c7ab4a86adc062017ef4f26d8e32ba7a5
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/icons.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/lib/metadata/types/icons.ts"],"sourcesContent":["export type StaticMetadata = {\n icon: any[] | undefined\n apple: any[] | undefined\n openGraph: any[] | undefined\n twitter: any[] | undefined\n manifest: string | undefined\n} | null\n"],"names":[],"mappings":"AAAA,WAMQ","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/manifest-types.js b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/manifest-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..2e6f3f71e49d7824d6d239e3115f6d345fb82421
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/manifest-types.js
@@ -0,0 +1,3 @@
+export { };
+
+//# sourceMappingURL=manifest-types.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/manifest-types.js.map b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/manifest-types.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..377ba211789661c8ee904462e27aab0ec542bc12
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/manifest-types.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/lib/metadata/types/manifest-types.ts"],"sourcesContent":["type ClientModeEnum =\n | 'auto'\n | 'focus-existing'\n | 'navigate-existing'\n | 'navigate-new'\n\ntype File = {\n name: string\n accept: string | string[]\n}\n\ntype Icon = {\n src: string\n type?: string | undefined\n sizes?: string | undefined\n purpose?: 'any' | 'maskable' | 'monochrome' | undefined\n}\n\nexport type Manifest = {\n background_color?: string | undefined\n categories?: string[] | undefined\n description?: string | undefined\n dir?: 'ltr' | 'rtl' | 'auto' | undefined\n display?: 'fullscreen' | 'standalone' | 'minimal-ui' | 'browser' | undefined\n display_override?:\n | (\n | 'fullscreen'\n | 'standalone'\n | 'minimal-ui'\n | 'browser'\n | 'window-controls-overlay'\n )[]\n | undefined\n file_handlers?:\n | {\n action: string\n accept: {\n [mimeType: string]: string[]\n }\n }[]\n | undefined\n icons?: Icon[] | undefined\n id?: string | undefined\n lang?: string | undefined\n launch_handler?:\n | {\n client_mode: ClientModeEnum | ClientModeEnum[]\n }\n | undefined\n name?: string | undefined\n orientation?:\n | 'any'\n | 'natural'\n | 'landscape'\n | 'portrait'\n | 'portrait-primary'\n | 'portrait-secondary'\n | 'landscape-primary'\n | 'landscape-secondary'\n | undefined\n prefer_related_applications?: boolean | undefined\n protocol_handlers?:\n | {\n protocol: string\n url: string\n }[]\n | undefined\n related_applications?:\n | {\n platform: string\n url: string\n id?: string | undefined\n }[]\n | undefined\n scope?: string | undefined\n screenshots?:\n | {\n form_factor?: 'narrow' | 'wide' | undefined\n label?: string | undefined\n platform?:\n | 'android'\n | 'chromeos'\n | 'ipados'\n | 'ios'\n | 'kaios'\n | 'macos'\n | 'windows'\n | 'xbox'\n | 'chrome_web_store'\n | 'itunes'\n | 'microsoft-inbox'\n | 'microsoft-store'\n | 'play'\n | undefined\n src: string\n type?: string | undefined\n sizes?: string | undefined\n }[]\n | undefined\n share_target?:\n | {\n action: string\n method?: 'get' | 'post' | 'GET' | 'POST' | undefined\n enctype?:\n | 'application/x-www-form-urlencoded'\n | 'multipart/form-data'\n | undefined\n params: {\n title?: string | undefined\n text?: string | undefined\n url?: string | undefined\n files?: File | File[] | undefined\n }\n }\n | undefined\n short_name?: string | undefined\n shortcuts?:\n | {\n name: string\n short_name?: string | undefined\n description?: string | undefined\n url: string\n icons?: Icon[] | undefined\n }[]\n | undefined\n start_url?: string | undefined\n theme_color?: string | undefined\n}\n"],"names":[],"mappings":"AAkBA,WA6GC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-interface.js b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-interface.js
new file mode 100644
index 0000000000000000000000000000000000000000..884195d571db3220817e1ff781cfc4ad39ae52a9
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-interface.js
@@ -0,0 +1,15 @@
+/**
+ * Next.js Metadata API
+ *
+ * This file defines the types used by Next.js to configure metadata
+ * through static exports or dynamic `generateMetadata` functions in Server Components.
+ *
+ * @remarks
+ * - The static `metadata` object and `generateMetadata` function are only supported in Server Components.
+ * - Do not export both a `metadata` object and a `generateMetadata` function from the same route segment.
+ * - You can still render metadata in client components directly as part of the component's JSX.
+ *
+ * @see https://nextjs.org/docs/app/api-reference/metadata
+ */ export { };
+
+//# sourceMappingURL=metadata-interface.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-interface.js.map b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-interface.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..acd3123544e3cdbb5dc8723106893b29a12d3edf
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-interface.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/lib/metadata/types/metadata-interface.ts"],"sourcesContent":["/**\n * Next.js Metadata API\n *\n * This file defines the types used by Next.js to configure metadata\n * through static exports or dynamic `generateMetadata` functions in Server Components.\n *\n * @remarks\n * - The static `metadata` object and `generateMetadata` function are only supported in Server Components.\n * - Do not export both a `metadata` object and a `generateMetadata` function from the same route segment.\n * - You can still render metadata in client components directly as part of the component's JSX.\n *\n * @see https://nextjs.org/docs/app/api-reference/metadata\n */\n\nimport type {\n AlternateURLs,\n Languages,\n ResolvedAlternateURLs,\n} from './alternative-urls-types'\nimport type {\n AppleWebApp,\n AppLinks,\n Facebook,\n FormatDetection,\n ItunesApp,\n Pinterest,\n ResolvedAppleWebApp,\n ResolvedAppLinks,\n ResolvedFacebook,\n ResolvedPinterest,\n ViewportLayout,\n} from './extra-types'\nimport type {\n DeprecatedMetadataFields,\n AbsoluteTemplateString,\n Author,\n ColorSchemeEnum,\n Icon,\n Icons,\n IconURL,\n ReferrerEnum,\n ResolvedIcons,\n ResolvedVerification,\n Robots,\n ResolvedRobots,\n TemplateString,\n Verification,\n ThemeColorDescriptor,\n Videos,\n} from './metadata-types'\nimport type { Manifest as ManifestFile } from './manifest-types'\nimport type { OpenGraph, ResolvedOpenGraph } from './opengraph-types'\nimport type { ResolvedTwitterMetadata, Twitter } from './twitter-types'\n\n/**\n * Metadata interface to describe all the metadata fields that can be set in a document.\n *\n * @remarks\n * This interface covers all the metadata fields available in Next.js including title, description,\n * icons, openGraph, twitter, and more. Fields such as `metadataBase` help in composing absolute URLs\n * from relative ones. The `title` field supports both simple strings and a template object with `default`,\n * `template`, and `absolute` properties.\n *\n * @example\n * ```tsx\n * // Static metadata export in a layout or page:\n * import type { Metadata } from 'next'\n *\n * export const metadata: Metadata = {\n * metadataBase: new URL('https://example.com'),\n * title: { default: 'My Site', template: '%s | My Site' },\n * description: 'Welcome to My Site',\n * alternates: {\n * canonical: 'https://example.com',\n * languages: {\n * 'en-US': 'https://example.com/en-US',\n * 'de-DE': 'https://example.com/de-DE'\n * }\n * },\n * openGraph: {\n * title: 'My Site',\n * description: 'Welcome to My Site',\n * url: 'https://example.com',\n * siteName: 'My Site',\n * images: [{ url: 'https://example.com/og.png' }]\n * },\n * }\n * ```\n */\ninterface Metadata extends DeprecatedMetadataFields {\n /**\n * The base path and origin for absolute URLs in various metadata fields.\n *\n * @remarks\n * When relative URLs (for Open Graph images, alternates, etc.) are used, they are composed with this base.\n * If not provided, Next.js will populate a default value based on environment variables.\n */\n metadataBase?: null | string | URL | undefined\n\n /**\n * The document title.\n *\n * @remarks\n * The title can be a simple string (e.g., `\"My Blog\"`) or an object with:\n * - `default`: A fallback title for child segments.\n * - `template`: A title template (e.g., `\"%s | My Website\"`) applied to child titles.\n * - `absolute`: A title that overrides parent templates.\n *\n * @example\n * ```tsx\n * // As a simple string:\n * title: \"My Blog\"\n *\n * // As a template object:\n * title: { default: \"Dashboard\", template: \"%s | My Website\" }\n *\n * // Using absolute value (ignores parent template):\n * title: { absolute: \"My Blog\", template: \"%s | My Website\" }\n * ```\n */\n title?: null | string | TemplateString | undefined\n\n /**\n * The document description, and optionally the Open Graph and Twitter descriptions.\n *\n * @example\n * ```tsx\n * description: \"My Blog Description\"\n * // Renders: \n * ```\n */\n description?: null | string | undefined\n\n // Standard metadata names\n // https://developer.mozilla.org/docs/Web/HTML/Element/meta/name\n\n /**\n * The application name.\n *\n * @example\n * ```tsx\n * applicationName: \"My Blog\"\n * // Renders: \n * ```\n */\n applicationName?: null | string | undefined\n\n /**\n * The authors of the document.\n *\n * @example\n * ```tsx\n * authors: [{ name: \"Next.js Team\", url: \"https://nextjs.org\" }]\n * // Renders:\n * // \n * // \n * ```\n */\n authors?: null | Author | Array | undefined\n\n /**\n * The generator used for the document.\n *\n * @example\n * ```tsx\n * generator: \"Next.js\"\n * // Renders: \n * ```\n */\n generator?: null | string | undefined\n\n /**\n * The keywords for the document.\n *\n * @remarks\n * When an array is provided, keywords are flattened into a comma-separated string.\n *\n * @example\n * ```tsx\n * keywords: \"nextjs, react, blog\"\n * // or\n * keywords: [\"react\", \"server components\"]\n * ```\n */\n keywords?: null | string | Array | undefined\n\n /**\n * The referrer setting for the document.\n *\n * @example\n * ```tsx\n * referrer: \"origin\"\n * // Renders: \n * ```\n */\n referrer?: null | ReferrerEnum | undefined\n\n /**\n * The theme color for the document.\n *\n * @deprecated Use the new viewport configuration (`export const viewport: Viewport = { ... }`) instead.\n */\n themeColor?:\n | null\n | string\n | ThemeColorDescriptor\n | ThemeColorDescriptor[]\n | undefined\n\n /**\n * The color scheme for the document.\n *\n * @deprecated Use the new viewport configuration (`export const viewport: Viewport = { ... }`) instead.\n */\n colorScheme?: null | ColorSchemeEnum | undefined\n\n /**\n * The viewport setting for the document.\n *\n * @deprecated Use the new viewport configuration (`export const viewport: Viewport = { ... }`) instead.\n */\n viewport?: null | string | ViewportLayout | undefined\n\n /**\n * The creator of the document.\n *\n * @example\n * ```tsx\n * creator: \"Next.js Team\"\n * // Renders: \n * ```\n */\n creator?: null | string | undefined\n\n /**\n * The publisher of the document.\n *\n * @example\n * ```tsx\n * publisher: \"Vercel\"\n * // Renders: \n * ```\n */\n publisher?: null | string | undefined\n\n // https://developer.mozilla.org/docs/Web/HTML/Element/meta/name#other_metadata_names\n\n /**\n * The robots setting for the document.\n *\n * @remarks\n * Can be a string (e.g., \"index, follow\") or an object with more granular rules.\n *\n * @example\n * ```tsx\n * robots: \"index, follow\"\n * // or\n * robots: { index: true, follow: true }\n * ```\n *\n * @see https://developer.mozilla.org/docs/Glossary/Robots.txt\n */\n robots?: null | string | Robots | undefined\n\n /**\n * The canonical and alternate URLs for the document.\n *\n * @remarks\n * This field allows defining a canonical URL as well as alternate URLs (such as for multiple languages).\n *\n * @example\n * ```tsx\n * alternates: {\n * canonical: \"https://example.com\",\n * languages: {\n * \"en-US\": \"https://example.com/en-US\"\n * }\n * }\n * ```\n */\n alternates?: null | AlternateURLs | undefined\n\n /**\n * The icons for the document. Defaults to rel=\"icon\".\n *\n * @remarks\n * You can specify a simple URL or an object to differentiate between icon types (e.g., apple-touch-icon).\n *\n * @example\n * ```tsx\n * icons: \"https://example.com/icon.png\"\n * // or\n * icons: {\n * icon: \"https://example.com/icon.png\",\n * apple: \"https://example.com/apple-icon.png\"\n * }\n * ```\n *\n * @see https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-icon\n */\n icons?: null | IconURL | Array | Icons | undefined\n\n /**\n * A web application manifest, as defined in the Web Application Manifest specification.\n *\n * @example\n * ```tsx\n * manifest: \"https://example.com/manifest.json\"\n * // Renders: \n * ```\n *\n * @see https://developer.mozilla.org/docs/Web/Manifest\n */\n manifest?: null | string | URL | undefined\n\n /**\n * The Open Graph metadata for the document.\n *\n * @remarks\n * Follows the Open Graph protocol to enrich link previews.\n *\n * @example\n * ```tsx\n * openGraph: {\n * type: \"website\",\n * url: \"https://example.com\",\n * title: \"My Website\",\n * description: \"My Website Description\",\n * siteName: \"My Website\",\n * images: [{ url: \"https://example.com/og.png\" }]\n * }\n * ```\n *\n * @see https://ogp.me/\n */\n openGraph?: null | OpenGraph | undefined\n\n /**\n * The Twitter metadata for the document.\n *\n * @remarks\n * - Used for configuring Twitter Cards and can include details such as `card`, `site`, and `creator`.\n * - Notably, more sites than just Twitter (now X) use this format.\n *\n * @example\n * ```tsx\n * twitter: {\n * card: \"summary_large_image\",\n * site: \"@site\",\n * creator: \"@creator\",\n * images: \"https://example.com/og.png\"\n * }\n * ```\n */\n twitter?: null | Twitter | undefined\n\n /**\n * The Facebook metadata for the document.\n *\n * @remarks\n * Specify either `appId` or `admins` (but not both) to configure Facebook integration.\n *\n * @example\n * ```tsx\n * facebook: { appId: \"12345678\" }\n * // Renders \n * // or\n * facebook: { admins: [\"12345678\"] }\n * // Renders \n * ```\n */\n facebook?: null | Facebook | undefined\n\n /**\n * The Pinterest metadata for the document to choose whether opt out of rich pin data.\n *\n * @example\n * ```tsx\n * pinterest: { richPin: true }\n * // Renders \n * ```\n */\n pinterest?: null | Pinterest\n\n /**\n * The common verification tokens for the document.\n *\n * @example\n * ```tsx\n * verification: { google: \"1234567890\", yandex: \"1234567890\", \"me\": \"1234567890\" }\n * // Renders \n * // \n * // \n * ```\n */\n verification?: Verification | undefined\n\n /**\n * The Apple web app metadata for the document.\n *\n * @example\n * ```tsx\n * appleWebApp: { capable: true, title: \"My Website\", statusBarStyle: \"black-translucent\" }\n * ```\n *\n * @see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html\n */\n appleWebApp?: null | boolean | AppleWebApp | undefined\n\n /**\n * Indicates whether devices should interpret certain formats (such as telephone numbers) as actionable links.\n *\n * @example\n * ```tsx\n * formatDetection: { telephone: false }\n * // Renders: \n * ```\n */\n formatDetection?: null | FormatDetection | undefined\n\n /**\n * The metadata for the iTunes App.\n *\n * @remarks\n * Adds the `name=\"apple-itunes-app\"` meta tag.\n *\n * @example\n * ```tsx\n * itunes: { app: { id: \"123456789\", affiliateData: \"123456789\", appArguments: \"123456789\" } }\n * // Renders \n * ```\n */\n itunes?: null | ItunesApp | undefined\n\n /**\n * A brief description of the web page.\n *\n * @remarks\n * Rendered as the `abstract` meta tag. This is *not recommended* as it is superseded by `description`.\n *\n * @example\n * ```tsx\n * abstract: \"My Website Description\"\n * // Renders \n * ```\n */\n abstract?: null | string | undefined\n\n /**\n * The Facebook AppLinks metadata for the document.\n *\n * @example\n * ```tsx\n * appLinks: {\n * ios: { appStoreId: \"123456789\", url: \"https://example.com\" },\n * android: { packageName: \"com.example\", url: \"https://example.com\" }\n * }\n *\n * // Renders\n * \n * \n * \n * \n * ```\n */\n appLinks?: null | AppLinks | undefined\n\n /**\n * The archives link rel property.\n *\n * @example\n * ```tsx\n * archives: \"https://example.com/archives\"\n * // Renders \n * ```\n */\n archives?: null | string | Array | undefined\n\n /**\n * The assets link rel property.\n *\n * @example\n * ```tsx\n * assets: \"https://example.com/assets\"\n * // Renders \n * ```\n */\n assets?: null | string | Array | undefined\n\n /**\n * The bookmarks link rel property.\n *\n * @remarks\n * Although technically against the HTML spec, this is used in practice.\n *\n * @example\n * ```tsx\n * bookmarks: \"https://example.com/bookmarks\"\n * // Renders \n * ```\n */\n bookmarks?: null | string | Array | undefined\n\n /**\n * The pagination link rel properties.\n *\n * @example\n * ```tsx\n * pagination: {\n * previous: \"https://example.com/items?page=1\",\n * next: \"https://example.com/items?page=3\"\n * }\n *\n * // Renders\n * \n * \n * ```\n *\n * @see https://developers.google.com/search/blog/2011/09/pagination-with-relnext-and-relprev\n */\n pagination?: {\n previous?: null | string | URL | undefined\n next?: null | string | URL | undefined\n }\n\n /**\n * The category meta name property.\n *\n * @example\n * ```tsx\n * category: \"My Category\"\n * // Renders \n * ```\n */\n category?: null | string | undefined\n\n /**\n * The classification meta name property.\n *\n * @example\n * ```tsx\n * classification: \"My Classification\"\n * // Renders \n * ```\n */\n classification?: null | string | undefined\n\n /**\n * Arbitrary name/value pairs for additional metadata.\n *\n * @remarks\n * Use this field to define custom meta tags that are not directly supported.\n *\n * @example\n * ```tsx\n * other: { custom: [\"meta1\", \"meta2\"] }\n * ```\n */\n other?:\n | {\n [name: string]: string | number | Array\n }\n | undefined\n}\n\n/**\n * ResolvedMetadataWithURLs represents the fully processed metadata after\n * defaults are applied and relative URLs are composed with `metadataBase`.\n */\ninterface ResolvedMetadataWithURLs {\n // origin and base path for absolute urls for various metadata links such as\n // opengraph-image\n metadataBase: string | null | URL\n\n // The Document title and template if defined\n title: null | AbsoluteTemplateString\n\n // The Document description, and optionally the opengraph and twitter descriptions\n description: null | string\n\n // Standard metadata names\n // https://developer.mozilla.org/docs/Web/HTML/Element/meta/name\n applicationName: null | string\n authors: null | Array\n generator: null | string\n // if you provide an array it will be flattened into a single tag with comma separation\n keywords: null | Array\n referrer: null | ReferrerEnum\n /**\n * @deprecated\n */\n themeColor: null | ThemeColorDescriptor[]\n /**\n * @deprecated\n */\n colorScheme: null | ColorSchemeEnum\n /**\n * @deprecated\n */\n viewport: null | string\n creator: null | string\n publisher: null | string\n\n // https://developer.mozilla.org/docs/Web/HTML/Element/meta/name#other_metadata_names\n robots: null | ResolvedRobots\n\n // The canonical and alternate URLs for this location\n alternates: null | ResolvedAlternateURLs\n\n // Defaults to rel=\"icon\" but the Icons type can be used\n // to get more specific about rel types\n icons: null | ResolvedIcons\n\n openGraph: null | ResolvedOpenGraph\n\n manifest: null | string | URL\n\n twitter: null | ResolvedTwitterMetadata\n\n facebook: null | ResolvedFacebook\n\n pinterest: null | ResolvedPinterest\n\n // common verification tokens\n verification: null | ResolvedVerification\n\n // Apple web app metadata\n // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html\n appleWebApp: null | ResolvedAppleWebApp\n\n // Should devices try to interpret various formats and make actionable links\n // out of them? The canonical example is telephone numbers on mobile that can\n // be clicked to dial\n formatDetection: null | FormatDetection\n\n // meta name=\"apple-itunes-app\"\n itunes: null | ItunesApp\n\n // meta name=\"abstract\"\n // A brief description of what this web-page is about.\n // Not recommended, superceded by description.\n // https://www.metatags.org/all-meta-tags-overview/meta-name-abstract/\n abstract: null | string\n\n // Facebook AppLinks\n appLinks: null | ResolvedAppLinks\n\n // link rel properties\n archives: null | Array\n assets: null | Array\n bookmarks: null | Array // This is technically against HTML spec but is used in wild\n pagination: {\n previous: null | string\n next: null | string\n }\n\n // meta name properties\n category: null | string\n classification: null | string\n other: null | {\n [name: string]: string | number | Array\n }\n}\n\nexport type WithStringifiedURLs = T extends URL\n ? string\n : T extends object\n ? { [K in keyof T]: WithStringifiedURLs }\n : T\n\n/**\n * ResolvedMetadata represents the fully processed metadata after defaults are\n * applied and relative URLs are composed with `metadataBase`.\n */\ntype ResolvedMetadata = WithStringifiedURLs\n\ntype RobotsRuleBase = {\n allow?: string | string[] | undefined\n disallow?: string | string[] | undefined\n crawlDelay?: number | undefined\n /**\n * Non-standard per-user-agent directives passed through verbatim to the\n * generated `robots.txt`. Keys preserve their casing and array values emit\n * one line per entry.\n *\n * @example\n * ```ts\n * // Seznam rate-limiting\n * // https://o-seznam.cz/napoveda/vyhledavani/en/crawling-control/\n * other: { 'Request-Rate': '10/1m' }\n *\n * // Yandex Clean-param (multiple values)\n * other: { 'Clean-param': ['ref /articles/', 'utm_source /'] }\n * ```\n */\n other?: Record> | undefined\n}\n\ntype RobotsFile = {\n // Apply rules for all\n rules:\n | (RobotsRuleBase & {\n userAgent?: string | string[] | undefined\n })\n // Apply rules for specific user agents\n | Array<\n RobotsRuleBase & {\n userAgent: string | string[]\n }\n >\n sitemap?: string | string[] | undefined\n host?: string | undefined\n}\n\ntype SitemapFile = Array<{\n url: string\n lastModified?: string | Date | undefined\n changeFrequency?:\n | 'always'\n | 'hourly'\n | 'daily'\n | 'weekly'\n | 'monthly'\n | 'yearly'\n | 'never'\n | undefined\n priority?: number | undefined\n alternates?:\n | {\n languages?: Languages | undefined\n }\n | undefined\n images?: string[] | undefined\n videos?: Videos[] | undefined\n}>\n\ntype ResolvingMetadata = Promise\ndeclare namespace MetadataRoute {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n export type Robots = RobotsFile\n export type Sitemap = SitemapFile\n export type Manifest = ManifestFile\n}\n\n/**\n * Interface for the viewport configuration.\n *\n * @remarks\n * This configuration allows defining properties such as width, initial scale, theme colors,\n * and color scheme.\n *\n * @example\n * ```tsx\n * export const viewport: Viewport = {\n * width: \"device-width\",\n * initialScale: 1,\n * themeColor: [\n * { media: \"(prefers-color-scheme: dark)\", color: \"#000000\" },\n * { media: \"(prefers-color-scheme: light)\", color: \"#ffffff\" }\n * ],\n * colorScheme: \"dark\"\n * }\n * ```\n */\ninterface Viewport extends ViewportLayout {\n /**\n * The theme color for the document.\n *\n * @example\n * ```tsx\n * themeColor: \"#000000\"\n * // Renders \n *\n * themeColor: { media: \"(prefers-color-scheme: dark)\", color: \"#000000\" }\n * // Renders \n *\n * themeColor: [\n * { media: \"(prefers-color-scheme: dark)\", color: \"#000000\" },\n * { media: \"(prefers-color-scheme: light)\", color: \"#ffffff\" }\n * ]\n * // Renders \n * // Renders \n * ```\n */\n themeColor?:\n | null\n | string\n | ThemeColorDescriptor\n | ThemeColorDescriptor[]\n | undefined\n\n /**\n * The color scheme for the document.\n *\n * @example\n * ```tsx\n * colorScheme: \"dark\"\n * // Renders \n * ```\n */\n colorScheme?: null | ColorSchemeEnum | undefined\n}\n\ninterface ResolvedViewport extends ViewportLayout {\n themeColor: null | ThemeColorDescriptor[]\n colorScheme: null | ColorSchemeEnum\n}\n\ntype ResolvingViewport = Promise\n\nexport type {\n Metadata,\n ResolvedMetadata,\n ResolvedMetadataWithURLs,\n ResolvingMetadata,\n MetadataRoute,\n Viewport,\n ResolvingViewport,\n ResolvedViewport,\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;CAYC,GA8xBD,WASC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-types.js b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..705b0a6498deb53ce2221bab7a34ba4125ac283b
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-types.js
@@ -0,0 +1,7 @@
+/**
+ *
+ * Metadata types
+ *
+ */ export { };
+
+//# sourceMappingURL=metadata-types.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-types.js.map b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-types.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..4fe8ccac85bbb3221c9b5bfc607c3fe34e529b04
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/metadata-types.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/lib/metadata/types/metadata-types.ts"],"sourcesContent":["/**\n *\n * Metadata types\n *\n */\n\nexport interface DeprecatedMetadataFields {\n /**\n * Deprecated options that have a preferred method\n * @deprecated Use appleWebApp instead\n */\n 'apple-touch-fullscreen'?: never | undefined\n\n /**\n * Obsolete since iOS 7.\n * @see https://web.dev/apple-touch-icon/\n * @deprecated Use icons.apple instead\n */\n 'apple-touch-icon-precomposed'?: never | undefined\n}\n\nexport type TemplateString =\n | DefaultTemplateString\n | AbsoluteTemplateString\n | AbsoluteString\nexport type DefaultTemplateString = {\n default: string\n template: string\n}\nexport type AbsoluteTemplateString = {\n absolute: string\n template: string | null\n}\nexport type AbsoluteString = {\n absolute: string\n}\n\nexport type Author = {\n // renders as | undefined\n phoneNumbers?: string | Array | undefined\n faxNumbers?: string | Array | undefined\n siteName?: string | undefined\n locale?: Locale | undefined\n alternateLocale?: Locale | Array | undefined\n images?: OGImage | Array | undefined\n audio?: OGAudio | Array | undefined\n videos?: OGVideo | Array | undefined\n url?: null | string | URL | undefined\n countryName?: string | undefined\n ttl?: number | undefined\n}\ntype OpenGraphWebsite = OpenGraphMetadata & {\n type: 'website'\n}\ntype OpenGraphArticle = OpenGraphMetadata & {\n type: 'article'\n publishedTime?: string | undefined // datetime\n modifiedTime?: string | undefined // datetime\n expirationTime?: string | undefined // datetime\n authors?: null | string | URL | Array | undefined\n section?: null | string | undefined\n tags?: null | string | Array | undefined\n}\ntype OpenGraphBook = OpenGraphMetadata & {\n type: 'book'\n isbn?: null | string | undefined\n releaseDate?: null | string | undefined // datetime\n authors?: null | string | URL | Array | undefined\n tags?: null | string | Array | undefined\n}\ntype OpenGraphProfile = OpenGraphMetadata & {\n type: 'profile'\n firstName?: null | string | undefined\n lastName?: null | string | undefined\n username?: null | string | undefined\n gender?: null | string | undefined\n}\ntype OpenGraphMusicSong = OpenGraphMetadata & {\n type: 'music.song'\n duration?: null | number | undefined\n albums?:\n | null\n | string\n | URL\n | OGAlbum\n | Array\n | undefined\n musicians?: null | string | URL | Array | undefined\n}\ntype OpenGraphMusicAlbum = OpenGraphMetadata & {\n type: 'music.album'\n songs?:\n | null\n | string\n | URL\n | OGSong\n | Array\n | undefined\n musicians?: null | string | URL | Array | undefined\n releaseDate?: null | string | undefined // datetime\n}\ntype OpenGraphMusicPlaylist = OpenGraphMetadata & {\n type: 'music.playlist'\n songs?:\n | null\n | string\n | URL\n | OGSong\n | Array\n | undefined\n creators?: null | string | URL | Array | undefined\n}\ntype OpenGraphRadioStation = OpenGraphMetadata & {\n type: 'music.radio_station'\n creators?: null | string | URL | Array | undefined\n}\ntype OpenGraphVideoMovie = OpenGraphMetadata & {\n type: 'video.movie'\n actors?:\n | null\n | string\n | URL\n | OGActor\n | Array\n | undefined\n directors?: null | string | URL | Array | undefined\n writers?: null | string | URL | Array | undefined\n duration?: null | number | undefined\n releaseDate?: null | string | undefined // datetime\n tags?: null | string | Array | undefined\n}\ntype OpenGraphVideoEpisode = OpenGraphMetadata & {\n type: 'video.episode'\n actors?:\n | null\n | string\n | URL\n | OGActor\n | Array\n | undefined\n directors?: null | string | URL | Array | undefined\n writers?: null | string | URL | Array | undefined\n duration?: null | number | undefined\n releaseDate?: null | string | undefined // datetime\n tags?: null | string | Array | undefined\n series?: null | string | URL | undefined\n}\ntype OpenGraphVideoTVShow = OpenGraphMetadata & {\n type: 'video.tv_show'\n}\ntype OpenGraphVideoOther = OpenGraphMetadata & {\n type: 'video.other'\n}\n\ntype OGImage = string | OGImageDescriptor | URL\ntype OGImageDescriptor = {\n url: string | URL\n secureUrl?: string | URL | undefined\n alt?: string | undefined\n type?: string | undefined\n width?: string | number | undefined\n height?: string | number | undefined\n}\ntype OGAudio = string | OGAudioDescriptor | URL\ntype OGAudioDescriptor = {\n url: string | URL\n secureUrl?: string | URL | undefined\n type?: string | undefined\n}\ntype OGVideo = string | OGVideoDescriptor | URL\ntype OGVideoDescriptor = {\n url: string | URL\n secureUrl?: string | URL | undefined\n type?: string | undefined\n width?: string | number | undefined\n height?: string | number | undefined\n}\n\nexport type ResolvedOpenGraph =\n | ResolvedOpenGraphWebsite\n | ResolvedOpenGraphArticle\n | ResolvedOpenGraphBook\n | ResolvedOpenGraphProfile\n | ResolvedOpenGraphMusicSong\n | ResolvedOpenGraphMusicAlbum\n | ResolvedOpenGraphMusicPlaylist\n | ResolvedOpenGraphRadioStation\n | ResolvedOpenGraphVideoMovie\n | ResolvedOpenGraphVideoEpisode\n | ResolvedOpenGraphVideoTVShow\n | ResolvedOpenGraphVideoOther\n | ResolvedOpenGraphMetadata\n\ntype ResolvedOpenGraphMetadata = {\n determiner?: 'a' | 'an' | 'the' | 'auto' | '' | undefined\n title: AbsoluteTemplateString\n description?: string | undefined\n emails?: Array | undefined\n phoneNumbers?: Array | undefined\n faxNumbers?: Array | undefined\n siteName?: string | undefined\n locale?: Locale | undefined\n alternateLocale?: Array | undefined\n images?: Array | undefined\n audio?: Array | undefined\n videos?: Array | undefined\n url: null | URL | string\n countryName?: string | undefined\n ttl?: number | undefined\n}\ntype ResolvedOpenGraphWebsite = ResolvedOpenGraphMetadata & {\n type: 'website'\n}\ntype ResolvedOpenGraphArticle = ResolvedOpenGraphMetadata & {\n type: 'article'\n publishedTime?: string | undefined // datetime\n modifiedTime?: string | undefined // datetime\n expirationTime?: string | undefined // datetime\n authors?: Array | undefined\n section?: string | undefined\n tags?: Array | undefined\n}\ntype ResolvedOpenGraphBook = ResolvedOpenGraphMetadata & {\n type: 'book'\n isbn?: string | undefined\n releaseDate?: string | undefined // datetime\n authors?: Array | undefined\n tags?: Array | undefined\n}\ntype ResolvedOpenGraphProfile = ResolvedOpenGraphMetadata & {\n type: 'profile'\n firstName?: string | undefined\n lastName?: string | undefined\n username?: string | undefined\n gender?: string | undefined\n}\ntype ResolvedOpenGraphMusicSong = ResolvedOpenGraphMetadata & {\n type: 'music.song'\n duration?: number | undefined\n albums?: Array | undefined\n musicians?: Array | undefined\n}\ntype ResolvedOpenGraphMusicAlbum = ResolvedOpenGraphMetadata & {\n type: 'music.album'\n songs?: Array | undefined\n musicians?: Array | undefined\n releaseDate?: string | undefined // datetime\n}\ntype ResolvedOpenGraphMusicPlaylist = ResolvedOpenGraphMetadata & {\n type: 'music.playlist'\n songs?: Array | undefined\n creators?: Array | undefined\n}\ntype ResolvedOpenGraphRadioStation = ResolvedOpenGraphMetadata & {\n type: 'music.radio_station'\n creators?: Array | undefined\n}\ntype ResolvedOpenGraphVideoMovie = ResolvedOpenGraphMetadata & {\n type: 'video.movie'\n actors?: Array | undefined\n directors?: Array | undefined\n writers?: Array | undefined\n duration?: number | undefined\n releaseDate?: string | undefined // datetime\n tags?: Array | undefined\n}\ntype ResolvedOpenGraphVideoEpisode = ResolvedOpenGraphMetadata & {\n type: 'video.episode'\n actors?: Array | undefined\n directors?: Array | undefined\n writers?: Array | undefined\n duration?: number | undefined\n releaseDate?: string | undefined // datetime\n tags?: Array | undefined\n series?: string | URL | undefined\n}\ntype ResolvedOpenGraphVideoTVShow = ResolvedOpenGraphMetadata & {\n type: 'video.tv_show'\n}\ntype ResolvedOpenGraphVideoOther = ResolvedOpenGraphMetadata & {\n type: 'video.other'\n}\n\ntype OGSong = {\n url: string | URL\n disc?: number | undefined\n track?: number | undefined\n}\ntype OGAlbum = {\n url: string | URL\n disc?: number | undefined\n track?: number | undefined\n}\ntype OGActor = {\n url: string | URL\n role?: string | undefined\n}\n"],"names":[],"mappings":"AAkLA,WAa6B","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/resolvers.js b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/resolvers.js
new file mode 100644
index 0000000000000000000000000000000000000000..ab865db74b91d680cad220eaba0b2fcef5a44d1a
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/resolvers.js
@@ -0,0 +1,3 @@
+export { };
+
+//# sourceMappingURL=resolvers.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/resolvers.js.map b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/resolvers.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..1d65cf4e496b40f6aea10f693f1eb6e7c5c9981a
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/resolvers.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/lib/metadata/types/resolvers.ts"],"sourcesContent":["import type { Metadata, ResolvedMetadataWithURLs } from './metadata-interface'\n\nexport type FieldResolver<\n Key extends keyof Data & keyof ResolvedData,\n Data = Metadata,\n ResolvedData = ResolvedMetadataWithURLs,\n> = (T: Data[Key]) => ResolvedData[Key]\n\nexport type FieldResolverExtraArgs<\n Key extends keyof Data & keyof ResolvedData,\n ExtraArgs extends unknown[] = any[],\n Data = Metadata,\n ResolvedData = ResolvedMetadataWithURLs,\n> = (T: Data[Key], ...args: ExtraArgs) => ResolvedData[Key]\n\nexport type AsyncFieldResolverExtraArgs<\n Key extends keyof Data & keyof ResolvedData,\n ExtraArgs extends unknown[] = any[],\n Data = Metadata,\n ResolvedData = ResolvedMetadataWithURLs,\n> = (T: Data[Key], ...args: ExtraArgs) => Promise\n\nexport type MetadataContext = {\n trailingSlash: boolean\n isStaticMetadataRouteFile: boolean\n}\n"],"names":[],"mappings":"AAsBA,WAGC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/twitter-types.js b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/twitter-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..e5b7ccc62d61f6028e8b47cbcd5bb29c45188e61
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/twitter-types.js
@@ -0,0 +1,4 @@
+// Reference: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup
+export { };
+
+//# sourceMappingURL=twitter-types.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/metadata/types/twitter-types.js.map b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/twitter-types.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2f53be6a5c7bb2d826ee6980fcddda58495c1814
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/metadata/types/twitter-types.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/lib/metadata/types/twitter-types.ts"],"sourcesContent":["// Reference: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup\n\nimport type { AbsoluteTemplateString, TemplateString } from './metadata-types'\n\nexport type Twitter =\n | TwitterSummary\n | TwitterSummaryLargeImage\n | TwitterPlayer\n | TwitterApp\n | TwitterMetadata\n\ntype TwitterMetadata = {\n // defaults to card=\"summary\"\n site?: null | string | undefined // username for account associated to the site itself\n siteId?: null | string | undefined // id for account associated to the site itself\n creator?: null | string | undefined // username for the account associated to the creator of the content on the site\n creatorId?: null | string | undefined // id for the account associated to the creator of the content on the site\n description?: null | string | undefined\n title?: string | TemplateString | undefined\n images?: TwitterImage | Array | undefined\n}\ntype TwitterSummary = TwitterMetadata & {\n card: 'summary'\n}\ntype TwitterSummaryLargeImage = TwitterMetadata & {\n card: 'summary_large_image'\n}\ntype TwitterPlayer = TwitterMetadata & {\n card: 'player'\n players: TwitterPlayerDescriptor | Array\n}\ntype TwitterApp = TwitterMetadata & {\n card: 'app'\n app: TwitterAppDescriptor\n}\nexport type TwitterAppDescriptor = {\n id: {\n iphone?: string | number | undefined\n ipad?: string | number | undefined\n googleplay?: string | undefined\n }\n url?:\n | {\n iphone?: string | URL | undefined\n ipad?: string | URL | undefined\n googleplay?: string | URL | undefined\n }\n | undefined\n name?: string | undefined\n}\n\ntype TwitterImage = string | TwitterImageDescriptor | URL\ntype TwitterImageDescriptor = {\n url: string | URL\n alt?: string | undefined\n secureUrl?: string | URL | undefined\n type?: string | undefined\n width?: string | number | undefined\n height?: string | number | undefined\n}\ntype TwitterPlayerDescriptor = {\n playerUrl: string | URL\n streamUrl: string | URL\n width: number\n height: number\n}\n\ntype ResolvedTwitterImage = {\n url: string | URL\n alt?: string | undefined\n secureUrl?: string | URL | undefined\n type?: string | undefined\n width?: string | number | undefined\n height?: string | number | undefined\n}\ntype ResolvedTwitterSummary = {\n site: string | null\n siteId: string | null\n creator: string | null\n creatorId: string | null\n description: string | null\n title: AbsoluteTemplateString\n images?: Array | undefined\n}\ntype ResolvedTwitterPlayer = ResolvedTwitterSummary & {\n players: Array\n}\ntype ResolvedTwitterApp = ResolvedTwitterSummary & { app: TwitterAppDescriptor }\n\nexport type ResolvedTwitterMetadata =\n | ({ card: 'summary' } & ResolvedTwitterSummary)\n | ({ card: 'summary_large_image' } & ResolvedTwitterSummary)\n | ({ card: 'player' } & ResolvedTwitterPlayer)\n | ({ card: 'app' } & ResolvedTwitterApp)\n"],"names":[],"mappings":"AAAA,8FAA8F;AAyF9F,WAI0C","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/mime-type.js b/e-commerce/node_modules/next/dist/esm/lib/mime-type.js
new file mode 100644
index 0000000000000000000000000000000000000000..5c5e34131516429d5d69ffebdc24d8a9a47997f8
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/mime-type.js
@@ -0,0 +1,10 @@
+/**
+ * Map of images extensions to MIME types
+ */ export const imageExtMimeTypeMap = {
+ jpeg: 'image/jpeg',
+ png: 'image/png',
+ ico: 'image/x-icon',
+ svg: 'image/svg+xml'
+};
+
+//# sourceMappingURL=mime-type.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/mime-type.js.map b/e-commerce/node_modules/next/dist/esm/lib/mime-type.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..3316083076ddfcb76b401c59100ca9ded57bab2f
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/mime-type.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/mime-type.ts"],"sourcesContent":["/**\n * Map of images extensions to MIME types\n */\nexport const imageExtMimeTypeMap = {\n jpeg: 'image/jpeg',\n png: 'image/png',\n ico: 'image/x-icon',\n svg: 'image/svg+xml',\n} as const\n"],"names":["imageExtMimeTypeMap","jpeg","png","ico","svg"],"mappings":"AAAA;;CAEC,GACD,OAAO,MAAMA,sBAAsB;IACjCC,MAAM;IACNC,KAAK;IACLC,KAAK;IACLC,KAAK;AACP,EAAU","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/mkcert.js b/e-commerce/node_modules/next/dist/esm/lib/mkcert.js
new file mode 100644
index 0000000000000000000000000000000000000000..39fea92201343e8ea7ab5674d8b47ecf1cf19208
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/mkcert.js
@@ -0,0 +1,132 @@
+import fs from 'node:fs';
+import path from 'node:path';
+import { X509Certificate, createPrivateKey } from 'node:crypto';
+import { getCacheDirectory } from './helpers/get-cache-directory';
+import * as Log from '../build/output/log';
+import { execSync } from 'node:child_process';
+const { WritableStream } = require('node:stream/web');
+const MKCERT_VERSION = 'v1.4.4';
+function getBinaryName() {
+ const platform = process.platform;
+ const arch = process.arch === 'x64' ? 'amd64' : process.arch;
+ if (platform === 'win32') {
+ return `mkcert-${MKCERT_VERSION}-windows-${arch}.exe`;
+ }
+ if (platform === 'darwin') {
+ return `mkcert-${MKCERT_VERSION}-darwin-${arch}`;
+ }
+ if (platform === 'linux') {
+ return `mkcert-${MKCERT_VERSION}-linux-${arch}`;
+ }
+ throw new Error(`Unsupported platform: ${platform}`);
+}
+async function downloadBinary() {
+ try {
+ const binaryName = getBinaryName();
+ const cacheDirectory = getCacheDirectory('mkcert');
+ const binaryPath = path.join(cacheDirectory, binaryName);
+ if (fs.existsSync(binaryPath)) {
+ return binaryPath;
+ }
+ const downloadUrl = `https://github.com/FiloSottile/mkcert/releases/download/${MKCERT_VERSION}/${binaryName}`;
+ await fs.promises.mkdir(cacheDirectory, {
+ recursive: true
+ });
+ Log.info(`Downloading mkcert package...`);
+ const response = await fetch(downloadUrl);
+ if (!response.ok || !response.body) {
+ throw new Error(`request failed with status ${response.status}`);
+ }
+ Log.info(`Download response was successful, writing to disk`);
+ const binaryWriteStream = fs.createWriteStream(binaryPath);
+ await response.body.pipeTo(new WritableStream({
+ write (chunk) {
+ return new Promise((resolve, reject)=>{
+ binaryWriteStream.write(chunk, (error)=>{
+ if (error) {
+ reject(error);
+ return;
+ }
+ resolve();
+ });
+ });
+ },
+ close () {
+ return new Promise((resolve, reject)=>{
+ binaryWriteStream.close((error)=>{
+ if (error) {
+ reject(error);
+ return;
+ }
+ resolve();
+ });
+ });
+ }
+ }));
+ await fs.promises.chmod(binaryPath, 493);
+ return binaryPath;
+ } catch (err) {
+ Log.error('Error downloading mkcert:', err);
+ }
+}
+export async function createSelfSignedCertificate(host, certDir = 'certificates') {
+ try {
+ const binaryPath = await downloadBinary();
+ if (!binaryPath) throw new Error('missing mkcert binary');
+ const resolvedCertDir = path.resolve(process.cwd(), `./${certDir}`);
+ await fs.promises.mkdir(resolvedCertDir, {
+ recursive: true
+ });
+ const keyPath = path.resolve(resolvedCertDir, 'localhost-key.pem');
+ const certPath = path.resolve(resolvedCertDir, 'localhost.pem');
+ if (fs.existsSync(keyPath) && fs.existsSync(certPath)) {
+ const cert = new X509Certificate(fs.readFileSync(certPath));
+ const key = fs.readFileSync(keyPath);
+ if (cert.checkHost(host ?? 'localhost') && cert.checkPrivateKey(createPrivateKey(key))) {
+ Log.info('Using already generated self signed certificate');
+ const caLocation = execSync(`"${binaryPath}" -CAROOT`).toString().trim();
+ return {
+ key: keyPath,
+ cert: certPath,
+ rootCA: `${caLocation}/rootCA.pem`
+ };
+ }
+ }
+ Log.info('Attempting to generate self signed certificate. This may prompt for your password');
+ const defaultHosts = [
+ 'localhost',
+ '127.0.0.1',
+ '::1'
+ ];
+ const hosts = host && !defaultHosts.includes(host) ? [
+ ...defaultHosts,
+ host
+ ] : defaultHosts;
+ execSync(`"${binaryPath}" -install -key-file "${keyPath}" -cert-file "${certPath}" ${hosts.join(' ')}`, {
+ stdio: 'ignore'
+ });
+ const caLocation = execSync(`"${binaryPath}" -CAROOT`).toString().trim();
+ if (!fs.existsSync(keyPath) || !fs.existsSync(certPath)) {
+ throw new Error('Certificate files not found');
+ }
+ Log.info(`CA Root certificate created in ${caLocation}`);
+ Log.info(`Certificates created in ${resolvedCertDir}`);
+ const gitignorePath = path.resolve(process.cwd(), './.gitignore');
+ if (fs.existsSync(gitignorePath)) {
+ const gitignore = await fs.promises.readFile(gitignorePath, 'utf8');
+ if (!gitignore.includes(certDir)) {
+ Log.info('Adding certificates to .gitignore');
+ await fs.promises.appendFile(gitignorePath, `\n${certDir}`);
+ }
+ }
+ return {
+ key: keyPath,
+ cert: certPath,
+ rootCA: `${caLocation}/rootCA.pem`
+ };
+ } catch (err) {
+ Log.error('Failed to generate self-signed certificate. Falling back to http.', err);
+ }
+}
+
+//# sourceMappingURL=mkcert.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/mkcert.js.map b/e-commerce/node_modules/next/dist/esm/lib/mkcert.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..e805cd93453e11d966f70d9f1d3329228cfd5f0e
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/mkcert.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/mkcert.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { X509Certificate, createPrivateKey } from 'node:crypto'\nimport { getCacheDirectory } from './helpers/get-cache-directory'\nimport * as Log from '../build/output/log'\nimport { execSync } from 'node:child_process'\nconst { WritableStream } =\n require('node:stream/web') as typeof import('node:stream/web')\n\nconst MKCERT_VERSION = 'v1.4.4'\n\nexport interface SelfSignedCertificate {\n key: string\n cert: string\n rootCA?: string\n}\n\nfunction getBinaryName() {\n const platform = process.platform\n const arch = process.arch === 'x64' ? 'amd64' : process.arch\n\n if (platform === 'win32') {\n return `mkcert-${MKCERT_VERSION}-windows-${arch}.exe`\n }\n if (platform === 'darwin') {\n return `mkcert-${MKCERT_VERSION}-darwin-${arch}`\n }\n if (platform === 'linux') {\n return `mkcert-${MKCERT_VERSION}-linux-${arch}`\n }\n\n throw new Error(`Unsupported platform: ${platform}`)\n}\n\nasync function downloadBinary() {\n try {\n const binaryName = getBinaryName()\n const cacheDirectory = getCacheDirectory('mkcert')\n const binaryPath = path.join(cacheDirectory, binaryName)\n\n if (fs.existsSync(binaryPath)) {\n return binaryPath\n }\n\n const downloadUrl = `https://github.com/FiloSottile/mkcert/releases/download/${MKCERT_VERSION}/${binaryName}`\n\n await fs.promises.mkdir(cacheDirectory, { recursive: true })\n\n Log.info(`Downloading mkcert package...`)\n\n const response = await fetch(downloadUrl)\n\n if (!response.ok || !response.body) {\n throw new Error(`request failed with status ${response.status}`)\n }\n\n Log.info(`Download response was successful, writing to disk`)\n\n const binaryWriteStream = fs.createWriteStream(binaryPath)\n\n await response.body.pipeTo(\n new WritableStream({\n write(chunk) {\n return new Promise((resolve, reject) => {\n binaryWriteStream.write(chunk, (error) => {\n if (error) {\n reject(error)\n return\n }\n\n resolve()\n })\n })\n },\n close() {\n return new Promise((resolve, reject) => {\n binaryWriteStream.close((error) => {\n if (error) {\n reject(error)\n return\n }\n\n resolve()\n })\n })\n },\n })\n )\n\n await fs.promises.chmod(binaryPath, 0o755)\n\n return binaryPath\n } catch (err) {\n Log.error('Error downloading mkcert:', err)\n }\n}\n\nexport async function createSelfSignedCertificate(\n host?: string,\n certDir: string = 'certificates'\n): Promise {\n try {\n const binaryPath = await downloadBinary()\n if (!binaryPath) throw new Error('missing mkcert binary')\n\n const resolvedCertDir = path.resolve(process.cwd(), `./${certDir}`)\n\n await fs.promises.mkdir(resolvedCertDir, {\n recursive: true,\n })\n\n const keyPath = path.resolve(resolvedCertDir, 'localhost-key.pem')\n const certPath = path.resolve(resolvedCertDir, 'localhost.pem')\n\n if (fs.existsSync(keyPath) && fs.existsSync(certPath)) {\n const cert = new X509Certificate(fs.readFileSync(certPath))\n const key = fs.readFileSync(keyPath)\n\n if (\n cert.checkHost(host ?? 'localhost') &&\n cert.checkPrivateKey(createPrivateKey(key))\n ) {\n Log.info('Using already generated self signed certificate')\n const caLocation = execSync(`\"${binaryPath}\" -CAROOT`).toString().trim()\n\n return {\n key: keyPath,\n cert: certPath,\n rootCA: `${caLocation}/rootCA.pem`,\n }\n }\n }\n\n Log.info(\n 'Attempting to generate self signed certificate. This may prompt for your password'\n )\n\n const defaultHosts = ['localhost', '127.0.0.1', '::1']\n\n const hosts =\n host && !defaultHosts.includes(host)\n ? [...defaultHosts, host]\n : defaultHosts\n\n execSync(\n `\"${binaryPath}\" -install -key-file \"${keyPath}\" -cert-file \"${certPath}\" ${hosts.join(\n ' '\n )}`,\n { stdio: 'ignore' }\n )\n\n const caLocation = execSync(`\"${binaryPath}\" -CAROOT`).toString().trim()\n\n if (!fs.existsSync(keyPath) || !fs.existsSync(certPath)) {\n throw new Error('Certificate files not found')\n }\n\n Log.info(`CA Root certificate created in ${caLocation}`)\n Log.info(`Certificates created in ${resolvedCertDir}`)\n\n const gitignorePath = path.resolve(process.cwd(), './.gitignore')\n\n if (fs.existsSync(gitignorePath)) {\n const gitignore = await fs.promises.readFile(gitignorePath, 'utf8')\n if (!gitignore.includes(certDir)) {\n Log.info('Adding certificates to .gitignore')\n\n await fs.promises.appendFile(gitignorePath, `\\n${certDir}`)\n }\n }\n\n return {\n key: keyPath,\n cert: certPath,\n rootCA: `${caLocation}/rootCA.pem`,\n }\n } catch (err) {\n Log.error(\n 'Failed to generate self-signed certificate. Falling back to http.',\n err\n )\n }\n}\n"],"names":["fs","path","X509Certificate","createPrivateKey","getCacheDirectory","Log","execSync","WritableStream","require","MKCERT_VERSION","getBinaryName","platform","process","arch","Error","downloadBinary","binaryName","cacheDirectory","binaryPath","join","existsSync","downloadUrl","promises","mkdir","recursive","info","response","fetch","ok","body","status","binaryWriteStream","createWriteStream","pipeTo","write","chunk","Promise","resolve","reject","error","close","chmod","err","createSelfSignedCertificate","host","certDir","resolvedCertDir","cwd","keyPath","certPath","cert","readFileSync","key","checkHost","checkPrivateKey","caLocation","toString","trim","rootCA","defaultHosts","hosts","includes","stdio","gitignorePath","gitignore","readFile","appendFile"],"mappings":"AAAA,OAAOA,QAAQ,UAAS;AACxB,OAAOC,UAAU,YAAW;AAC5B,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,cAAa;AAC/D,SAASC,iBAAiB,QAAQ,gCAA+B;AACjE,YAAYC,SAAS,sBAAqB;AAC1C,SAASC,QAAQ,QAAQ,qBAAoB;AAC7C,MAAM,EAAEC,cAAc,EAAE,GACtBC,QAAQ;AAEV,MAAMC,iBAAiB;AAQvB,SAASC;IACP,MAAMC,WAAWC,QAAQD,QAAQ;IACjC,MAAME,OAAOD,QAAQC,IAAI,KAAK,QAAQ,UAAUD,QAAQC,IAAI;IAE5D,IAAIF,aAAa,S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AM;QAEtD,MAAMC,QACJhB,QAAQ,CAACe,aAAaE,QAAQ,CAACjB,QAC3B;eAAIe;YAAcf;SAAK,GACvBe;QAENrD,SACE,CAAC,CAAC,EAAEY,WAAW,sBAAsB,EAAE8B,QAAQ,cAAc,EAAEC,SAAS,EAAE,EAAEW,MAAMzC,IAAI,CACpF,MACC,EACH;YAAE2C,OAAO;QAAS;QAGpB,MAAMP,aAAajD,SAAS,CAAC,CAAC,EAAEY,WAAW,SAAS,CAAC,EAAEsC,QAAQ,GAAGC,IAAI;QAEtE,IAAI,CAACzD,GAAGoB,UAAU,CAAC4B,YAAY,CAAChD,GAAGoB,UAAU,CAAC6B,WAAW;YACvD,MAAM,IAAInC,MAAM;QAClB;QAEAT,IAAIoB,IAAI,CAAC,CAAC,+BAA+B,EAAE8B,YAAY;QACvDlD,IAAIoB,IAAI,CAAC,CAAC,wBAAwB,EAAEqB,iBAAiB;QAErD,MAAMiB,gBAAgB9D,KAAKoC,OAAO,CAACzB,QAAQmC,GAAG,IAAI;QAElD,IAAI/C,GAAGoB,UAAU,CAAC2C,gBAAgB;YAChC,MAAMC,YAAY,MAAMhE,GAAGsB,QAAQ,CAAC2C,QAAQ,CAACF,eAAe;YAC5D,IAAI,CAACC,UAAUH,QAAQ,CAAChB,UAAU;gBAChCxC,IAAIoB,IAAI,CAAC;gBAET,MAAMzB,GAAGsB,QAAQ,CAAC4C,UAAU,CAACH,eAAe,CAAC,EAAE,EAAElB,SAAS;YAC5D;QACF;QAEA,OAAO;YACLO,KAAKJ;YACLE,MAAMD;YACNS,QAAQ,GAAGH,WAAW,WAAW,CAAC;QACpC;IACF,EAAE,OAAOb,KAAK;QACZrC,IAAIkC,KAAK,CACP,qEACAG;IAEJ;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/multi-file-writer.js b/e-commerce/node_modules/next/dist/esm/lib/multi-file-writer.js
new file mode 100644
index 0000000000000000000000000000000000000000..d5aeb0c6f4df2de97914b78a307e789669ff1385
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/multi-file-writer.js
@@ -0,0 +1,64 @@
+import path from '../shared/lib/isomorphic/path';
+/**
+ * MultiFileWriter is a utility for writing multiple files in parallel that
+ * guarantees that all files will be written after their containing directory
+ * is created, and that the directory will only be created once.
+ */ export class MultiFileWriter {
+ constructor(/**
+ * The file system methods to use.
+ */ fs){
+ this.fs = fs;
+ this.tasks = [];
+ }
+ /**
+ * Finds or creates a task for a directory.
+ *
+ * @param directory - The directory to find or create a task for.
+ * @returns The task for the directory.
+ */ findOrCreateTask(directory) {
+ // See if this directory already has a task to create it.
+ for (const task of this.tasks){
+ if (task[0] === directory) {
+ return task;
+ }
+ }
+ const promise = this.fs.mkdir(directory);
+ // Attach a catch handler so that it doesn't throw an unhandled promise
+ // rejection warning.
+ promise.catch(()=>{});
+ // Otherwise, create a new task for this directory.
+ const task = [
+ directory,
+ promise,
+ []
+ ];
+ this.tasks.push(task);
+ return task;
+ }
+ /**
+ * Appends a file to the writer to be written after its containing directory
+ * is created. The file writer should be awaited after all the files have been
+ * appended. Any async operation that occurs between appending and awaiting
+ * may cause an unhandled promise rejection warning and potentially crash the
+ * process.
+ *
+ * @param filePath - The path to the file to write.
+ * @param data - The data to write to the file.
+ */ append(filePath, data) {
+ // Find or create a task for the directory that contains the file.
+ const task = this.findOrCreateTask(path.dirname(filePath));
+ const promise = task[1].then(()=>this.fs.writeFile(filePath, data));
+ // Attach a catch handler so that it doesn't throw an unhandled promise
+ // rejection warning.
+ promise.catch(()=>{});
+ // Add the file write to the task AFTER the directory promise has resolved.
+ task[2].push(promise);
+ }
+ /**
+ * Returns a promise that resolves when all the files have been written.
+ */ wait() {
+ return Promise.all(this.tasks.flatMap((task)=>task[2]));
+ }
+}
+
+//# sourceMappingURL=multi-file-writer.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/multi-file-writer.js.map b/e-commerce/node_modules/next/dist/esm/lib/multi-file-writer.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ac66e4ddecb93e0bdaba5176b57a7c944393082d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/multi-file-writer.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/multi-file-writer.ts"],"sourcesContent":["import path from '../shared/lib/isomorphic/path'\nimport type { CacheFs } from '../shared/lib/utils'\n\n/**\n * A task to be written.\n */\ntype Task = [\n /**\n * The directory to create.\n */\n directory: string,\n\n /**\n * The promise to create the directory.\n */\n mkdir: Promise,\n\n /**\n * The promises to write the files that are dependent on the directory being\n * created.\n */\n writeFile: Promise[],\n]\n/**\n * MultiFileWriter is a utility for writing multiple files in parallel that\n * guarantees that all files will be written after their containing directory\n * is created, and that the directory will only be created once.\n */\nexport class MultiFileWriter {\n /**\n * The tasks to be written.\n */\n private readonly tasks: Task[] = []\n\n constructor(\n /**\n * The file system methods to use.\n */\n private readonly fs: Pick\n ) {}\n\n /**\n * Finds or creates a task for a directory.\n *\n * @param directory - The directory to find or create a task for.\n * @returns The task for the directory.\n */\n private findOrCreateTask(directory: string): Task {\n // See if this directory already has a task to create it.\n for (const task of this.tasks) {\n if (task[0] === directory) {\n return task\n }\n }\n\n const promise = this.fs.mkdir(directory)\n\n // Attach a catch handler so that it doesn't throw an unhandled promise\n // rejection warning.\n promise.catch(() => {})\n\n // Otherwise, create a new task for this directory.\n const task: Task = [directory, promise, []]\n this.tasks.push(task)\n\n return task\n }\n\n /**\n * Appends a file to the writer to be written after its containing directory\n * is created. The file writer should be awaited after all the files have been\n * appended. Any async operation that occurs between appending and awaiting\n * may cause an unhandled promise rejection warning and potentially crash the\n * process.\n *\n * @param filePath - The path to the file to write.\n * @param data - The data to write to the file.\n */\n public append(filePath: string, data: Buffer | string): void {\n // Find or create a task for the directory that contains the file.\n const task = this.findOrCreateTask(path.dirname(filePath))\n\n const promise = task[1].then(() => this.fs.writeFile(filePath, data))\n\n // Attach a catch handler so that it doesn't throw an unhandled promise\n // rejection warning.\n promise.catch(() => {})\n\n // Add the file write to the task AFTER the directory promise has resolved.\n task[2].push(promise)\n }\n\n /**\n * Returns a promise that resolves when all the files have been written.\n */\n public wait(): Promise {\n return Promise.all(this.tasks.flatMap((task) => task[2]))\n }\n}\n"],"names":["path","MultiFileWriter","constructor","fs","tasks","findOrCreateTask","directory","task","promise","mkdir","catch","push","append","filePath","data","dirname","then","writeFile","wait","Promise","all","flatMap"],"mappings":"AAAA,OAAOA,UAAU,gCAA+B;AAuBhD;;;;CAIC,GACD,OAAO,MAAMC;IAMXC,YACE;;KAEC,GACD,AAAiBC,EAAwC,CACzD;aADiBA,KAAAA;aANFC,QAAgB,EAAE;IAOhC;IAEH;;;;;GAKC,GACD,AAAQC,iBAAiBC,SAAiB,EAAQ;QAChD,yDAAyD;QACzD,KAAK,MAAMC,QAAQ,IAAI,CAACH,KAAK,CAAE;YAC7B,IAAIG,IAAI,CAAC,EAAE,KAAKD,WAAW;gBACzB,OAAOC;YACT;QACF;QAEA,MAAMC,UAAU,IAAI,CAACL,EAAE,CAACM,KAAK,CAACH;QAE9B,uEAAuE;QACvE,qBAAqB;QACrBE,QAAQE,KAAK,CAAC,KAAO;QAErB,mDAAmD;QACnD,MAAMH,OAAa;YAACD;YAAWE;YAAS,EAAE;SAAC;QAC3C,IAAI,CAACJ,KAAK,CAACO,IAAI,CAACJ;QAEhB,OAAOA;IACT;IAEA;;;;;;;;;GASC,GACD,AAAOK,OAAOC,QAAgB,EAAEC,IAAqB,EAAQ;QAC3D,kEAAkE;QAClE,MAAMP,OAAO,IAAI,CAACF,gBAAgB,CAACL,KAAKe,OAAO,CAACF;QAEhD,MAAML,UAAUD,IAAI,CAAC,EAAE,CAACS,IAAI,CAAC,IAAM,IAAI,CAACb,EAAE,CAACc,SAAS,CAACJ,UAAUC;QAE/D,uEAAuE;QACvE,qBAAqB;QACrBN,QAAQE,KAAK,CAAC,KAAO;QAErB,2EAA2E;QAC3EH,IAAI,CAAC,EAAE,CAACI,IAAI,CAACH;IACf;IAEA;;GAEC,GACD,AAAOU,OAAyB;QAC9B,OAAOC,QAAQC,GAAG,CAAC,IAAI,CAAChB,KAAK,CAACiB,OAAO,CAAC,CAACd,OAASA,IAAI,CAAC,EAAE;IACzD;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/needs-experimental-react.js b/e-commerce/node_modules/next/dist/esm/lib/needs-experimental-react.js
new file mode 100644
index 0000000000000000000000000000000000000000..cbdabe5617f3a937c017de4a365b5fc48c76e26b
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/needs-experimental-react.js
@@ -0,0 +1,7 @@
+// Keep in sync with Turbopack's experimental React switch: file://./../../../../crates/next-core/src/next_config.rs
+export function needsExperimentalReact(config) {
+ const { blockingSSR, taint, transitionIndicator, gestureTransition } = config.experimental || {};
+ return Boolean(blockingSSR || taint || transitionIndicator || gestureTransition);
+}
+
+//# sourceMappingURL=needs-experimental-react.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/needs-experimental-react.js.map b/e-commerce/node_modules/next/dist/esm/lib/needs-experimental-react.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..e50c434877d3f0703cad45ff4f79b38a2e5a17ae
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/needs-experimental-react.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/needs-experimental-react.ts"],"sourcesContent":["import type { NextConfig } from '../server/config-shared'\n\n// Keep in sync with Turbopack's experimental React switch: file://./../../../../crates/next-core/src/next_config.rs\nexport function needsExperimentalReact(config: NextConfig) {\n const { blockingSSR, taint, transitionIndicator, gestureTransition } =\n config.experimental || {}\n return Boolean(\n blockingSSR || taint || transitionIndicator || gestureTransition\n )\n}\n"],"names":["needsExperimentalReact","config","blockingSSR","taint","transitionIndicator","gestureTransition","experimental","Boolean"],"mappings":"AAEA,oHAAoH;AACpH,OAAO,SAASA,uBAAuBC,MAAkB;IACvD,MAAM,EAAEC,WAAW,EAAEC,KAAK,EAAEC,mBAAmB,EAAEC,iBAAiB,EAAE,GAClEJ,OAAOK,YAAY,IAAI,CAAC;IAC1B,OAAOC,QACLL,eAAeC,SAASC,uBAAuBC;AAEnD","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/non-nullable.js b/e-commerce/node_modules/next/dist/esm/lib/non-nullable.js
new file mode 100644
index 0000000000000000000000000000000000000000..d469efd7da30e71d781bf41aed74697645074647
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/non-nullable.js
@@ -0,0 +1,5 @@
+export function nonNullable(value) {
+ return value !== null && value !== undefined;
+}
+
+//# sourceMappingURL=non-nullable.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/non-nullable.js.map b/e-commerce/node_modules/next/dist/esm/lib/non-nullable.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..7dbca1ea1e28359de02b5bb59682b52f7b856ec9
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/non-nullable.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/non-nullable.ts"],"sourcesContent":["export function nonNullable(value: T): value is NonNullable {\n return value !== null && value !== undefined\n}\n"],"names":["nonNullable","value","undefined"],"mappings":"AAAA,OAAO,SAASA,YAAeC,KAAQ;IACrC,OAAOA,UAAU,QAAQA,UAAUC;AACrC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/normalize-path.js b/e-commerce/node_modules/next/dist/esm/lib/normalize-path.js
new file mode 100644
index 0000000000000000000000000000000000000000..c93035a3d33d7552615e1a7dcf04d50303055687
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/normalize-path.js
@@ -0,0 +1,6 @@
+import path from 'path';
+export function normalizePath(file) {
+ return path.sep === '\\' ? file.replace(/\\/g, '/') : file;
+}
+
+//# sourceMappingURL=normalize-path.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/normalize-path.js.map b/e-commerce/node_modules/next/dist/esm/lib/normalize-path.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..be20bee8ce1ca3187dc7105cd80cbbfdff0a45e5
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/normalize-path.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/normalize-path.ts"],"sourcesContent":["import path from 'path'\n\nexport function normalizePath(file: string) {\n return path.sep === '\\\\' ? file.replace(/\\\\/g, '/') : file\n}\n"],"names":["path","normalizePath","file","sep","replace"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AAEvB,OAAO,SAASC,cAAcC,IAAY;IACxC,OAAOF,KAAKG,GAAG,KAAK,OAAOD,KAAKE,OAAO,CAAC,OAAO,OAAOF;AACxD","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/oxford-comma-list.js b/e-commerce/node_modules/next/dist/esm/lib/oxford-comma-list.js
new file mode 100644
index 0000000000000000000000000000000000000000..14ef453d60c5a907b395280a295089810a81fb43
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/oxford-comma-list.js
@@ -0,0 +1,5 @@
+export function getOxfordCommaList(items) {
+ return items.map((v, index, { length })=>(index > 0 ? index === length - 1 ? length > 2 ? ', and ' : ' and ' : ', ' : '') + v).join('');
+}
+
+//# sourceMappingURL=oxford-comma-list.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/oxford-comma-list.js.map b/e-commerce/node_modules/next/dist/esm/lib/oxford-comma-list.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..960f85573f0f170f14ed3c377a105802e3cfbc54
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/oxford-comma-list.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/oxford-comma-list.ts"],"sourcesContent":["export function getOxfordCommaList(items: string[]): string {\n return items\n .map(\n (v, index, { length }) =>\n (index > 0\n ? index === length - 1\n ? length > 2\n ? ', and '\n : ' and '\n : ', '\n : '') + v\n )\n .join('')\n}\n"],"names":["getOxfordCommaList","items","map","v","index","length","join"],"mappings":"AAAA,OAAO,SAASA,mBAAmBC,KAAe;IAChD,OAAOA,MACJC,GAAG,CACF,CAACC,GAAGC,OAAO,EAAEC,MAAM,EAAE,GACnB,AAACD,CAAAA,QAAQ,IACLA,UAAUC,SAAS,IACjBA,SAAS,IACP,WACA,UACF,OACF,EAAC,IAAKF,GAEbG,IAAI,CAAC;AACV","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/page-types.js b/e-commerce/node_modules/next/dist/esm/lib/page-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..b521e76239fca6aa10ab94c5f227926c38109c10
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/page-types.js
@@ -0,0 +1,8 @@
+export var PAGE_TYPES = /*#__PURE__*/ function(PAGE_TYPES) {
+ PAGE_TYPES["PAGES"] = "pages";
+ PAGE_TYPES["ROOT"] = "root";
+ PAGE_TYPES["APP"] = "app";
+ return PAGE_TYPES;
+}({});
+
+//# sourceMappingURL=page-types.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/page-types.js.map b/e-commerce/node_modules/next/dist/esm/lib/page-types.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..a63244463403d6e0dc623f22da0de71204449554
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/page-types.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/page-types.ts"],"sourcesContent":["export const enum PAGE_TYPES {\n PAGES = 'pages',\n ROOT = 'root',\n APP = 'app',\n}\n"],"names":["PAGE_TYPES"],"mappings":"AAAA,OAAO,IAAA,AAAWA,oCAAAA;;;;WAAAA;MAIjB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/patch-incorrect-lockfile.js b/e-commerce/node_modules/next/dist/esm/lib/patch-incorrect-lockfile.js
new file mode 100644
index 0000000000000000000000000000000000000000..15c2426597a6411de9048a36d323ebcae6289054
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/patch-incorrect-lockfile.js
@@ -0,0 +1,131 @@
+import { readFileSync, writeFileSync } from 'fs';
+import * as Log from '../build/output/log';
+import findUp from 'next/dist/compiled/find-up';
+// @ts-ignore no-json types
+import { optionalDependencies as nextOptionalDeps } from 'next/package.json';
+import { isCI } from '../server/ci-info';
+import { getRegistry } from './helpers/get-registry';
+let registry;
+async function fetchPkgInfo(pkg) {
+ if (!registry) registry = getRegistry();
+ const res = await fetch(`${registry}${pkg}`);
+ if (!res.ok) {
+ throw new Error(`Failed to fetch registry info for ${pkg}, got status ${res.status}`);
+ }
+ const data = await res.json();
+ const versionData = data.versions["16.4.0"];
+ return {
+ os: versionData.os,
+ cpu: versionData.cpu,
+ engines: versionData.engines,
+ tarball: versionData.dist.tarball,
+ integrity: versionData.dist.integrity
+ };
+}
+/**
+ * Attempts to patch npm package-lock.json when it
+ * fails to include optionalDependencies for other platforms
+ * this can occur when the package-lock is rebuilt from a current
+ * node_modules install instead of pulling fresh package data
+ */ export async function patchIncorrectLockfile(dir) {
+ if (process.env.NEXT_IGNORE_INCORRECT_LOCKFILE) {
+ return;
+ }
+ const lockfilePath = await findUp('package-lock.json', {
+ cwd: dir
+ });
+ if (!lockfilePath) {
+ // if no lockfile present there is no action to take
+ return;
+ }
+ const content = readFileSync(lockfilePath, 'utf8');
+ // maintain current line ending
+ const endingNewline = content.endsWith('\r\n') ? '\r\n' : content.endsWith('\n') ? '\n' : '';
+ const lockfileParsed = JSON.parse(content);
+ const lockfileVersion = parseInt(lockfileParsed == null ? void 0 : lockfileParsed.lockfileVersion, 10);
+ const expectedSwcPkgs = Object.keys(nextOptionalDeps || {}).filter((pkg)=>pkg.startsWith('@next/swc-'));
+ const patchDependency = (pkg, pkgData)=>{
+ lockfileParsed.dependencies[pkg] = {
+ version: "16.4.0",
+ resolved: pkgData.tarball,
+ integrity: pkgData.integrity,
+ optional: true
+ };
+ };
+ const patchPackage = (pkg, pkgData)=>{
+ lockfileParsed.packages[pkg] = {
+ version: "16.4.0",
+ resolved: pkgData.tarball,
+ integrity: pkgData.integrity,
+ cpu: pkgData.cpu,
+ optional: true,
+ os: pkgData.os,
+ engines: pkgData.engines
+ };
+ };
+ try {
+ const supportedVersions = [
+ 1,
+ 2,
+ 3
+ ];
+ if (!supportedVersions.includes(lockfileVersion)) {
+ // bail on unsupported version
+ return;
+ }
+ // v1 only uses dependencies
+ // v2 uses dependencies and packages
+ // v3 only uses packages
+ const shouldPatchDependencies = lockfileVersion === 1 || lockfileVersion === 2;
+ const shouldPatchPackages = lockfileVersion === 2 || lockfileVersion === 3;
+ if (shouldPatchDependencies && !lockfileParsed.dependencies || shouldPatchPackages && !lockfileParsed.packages) {
+ // invalid lockfile so bail
+ return;
+ }
+ const missingSwcPkgs = [];
+ let pkgPrefix;
+ if (shouldPatchPackages) {
+ pkgPrefix = '';
+ for (const pkg of Object.keys(lockfileParsed.packages)){
+ if (pkg.endsWith('node_modules/next')) {
+ pkgPrefix = pkg.substring(0, pkg.length - 4);
+ }
+ }
+ if (!pkgPrefix) {
+ // unable to locate the next package so bail
+ return;
+ }
+ }
+ for (const pkg of expectedSwcPkgs){
+ if (shouldPatchDependencies && !lockfileParsed.dependencies[pkg] || shouldPatchPackages && !lockfileParsed.packages[`${pkgPrefix}${pkg}`]) {
+ missingSwcPkgs.push(pkg);
+ }
+ }
+ if (missingSwcPkgs.length === 0) {
+ return;
+ }
+ Log.warn(`Found lockfile missing swc dependencies,`, isCI ? 'run next locally to automatically patch' : 'patching...');
+ if (isCI) {
+ // no point in updating in CI as the user can't save the patch
+ return;
+ }
+ const pkgsData = await Promise.all(missingSwcPkgs.map((pkg)=>fetchPkgInfo(pkg)));
+ for(let i = 0; i < pkgsData.length; i++){
+ const pkg = missingSwcPkgs[i];
+ const pkgData = pkgsData[i];
+ if (shouldPatchDependencies) {
+ patchDependency(pkg, pkgData);
+ }
+ if (shouldPatchPackages) {
+ patchPackage(`${pkgPrefix}${pkg}`, pkgData);
+ }
+ }
+ writeFileSync(lockfilePath, JSON.stringify(lockfileParsed, null, 2) + endingNewline);
+ Log.warn('Lockfile was successfully patched, please run "npm install" to ensure @next/swc dependencies are downloaded');
+ } catch (err) {
+ Log.error(`Failed to patch lockfile, please try uninstalling and reinstalling next in this workspace`);
+ console.error(err);
+ }
+}
+
+//# sourceMappingURL=patch-incorrect-lockfile.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/patch-incorrect-lockfile.js.map b/e-commerce/node_modules/next/dist/esm/lib/patch-incorrect-lockfile.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..adecfe464e19c1f8b04112b0fc593f1d9151c164
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/patch-incorrect-lockfile.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/patch-incorrect-lockfile.ts"],"sourcesContent":["import { readFileSync, writeFileSync } from 'fs'\nimport * as Log from '../build/output/log'\nimport findUp from 'next/dist/compiled/find-up'\n// @ts-ignore no-json types\nimport { optionalDependencies as nextOptionalDeps } from 'next/package.json'\nimport type { UnwrapPromise } from './coalesced-function'\nimport { isCI } from '../server/ci-info'\nimport { getRegistry } from './helpers/get-registry'\n\nlet registry: string | undefined\n\nasync function fetchPkgInfo(pkg: string) {\n if (!registry) registry = getRegistry()\n const res = await fetch(`${registry}${pkg}`)\n\n if (!res.ok) {\n throw new Error(\n `Failed to fetch registry info for ${pkg}, got status ${res.status}`\n )\n }\n const data = await res.json()\n const versionData = data.versions[process.env.__NEXT_VERSION as string]\n\n return {\n os: versionData.os,\n cpu: versionData.cpu,\n engines: versionData.engines,\n tarball: versionData.dist.tarball,\n integrity: versionData.dist.integrity,\n }\n}\n\n/**\n * Attempts to patch npm package-lock.json when it\n * fails to include optionalDependencies for other platforms\n * this can occur when the package-lock is rebuilt from a current\n * node_modules install instead of pulling fresh package data\n */\nexport async function patchIncorrectLockfile(dir: string) {\n if (process.env.NEXT_IGNORE_INCORRECT_LOCKFILE) {\n return\n }\n const lockfilePath = await findUp('package-lock.json', { cwd: dir })\n\n if (!lockfilePath) {\n // if no lockfile present there is no action to take\n return\n }\n const content = readFileSync(lockfilePath, 'utf8')\n // maintain current line ending\n const endingNewline = content.endsWith('\\r\\n')\n ? '\\r\\n'\n : content.endsWith('\\n')\n ? '\\n'\n : ''\n\n const lockfileParsed = JSON.parse(content)\n const lockfileVersion = parseInt(lockfileParsed?.lockfileVersion, 10)\n const expectedSwcPkgs = Object.keys(nextOptionalDeps || {}).filter((pkg) =>\n pkg.startsWith('@next/swc-')\n )\n\n const patchDependency = (\n pkg: string,\n pkgData: UnwrapPromise>\n ) => {\n lockfileParsed.dependencies[pkg] = {\n version: process.env.__NEXT_VERSION as string,\n resolved: pkgData.tarball,\n integrity: pkgData.integrity,\n optional: true,\n }\n }\n\n const patchPackage = (\n pkg: string,\n pkgData: UnwrapPromise>\n ) => {\n lockfileParsed.packages[pkg] = {\n version: process.env.__NEXT_VERSION as string,\n resolved: pkgData.tarball,\n integrity: pkgData.integrity,\n cpu: pkgData.cpu,\n optional: true,\n os: pkgData.os,\n engines: pkgData.engines,\n }\n }\n\n try {\n const supportedVersions = [1, 2, 3]\n\n if (!supportedVersions.includes(lockfileVersion)) {\n // bail on unsupported version\n return\n }\n // v1 only uses dependencies\n // v2 uses dependencies and packages\n // v3 only uses packages\n const shouldPatchDependencies =\n lockfileVersion === 1 || lockfileVersion === 2\n const shouldPatchPackages = lockfileVersion === 2 || lockfileVersion === 3\n\n if (\n (shouldPatchDependencies && !lockfileParsed.dependencies) ||\n (shouldPatchPackages && !lockfileParsed.packages)\n ) {\n // invalid lockfile so bail\n return\n }\n const missingSwcPkgs = []\n let pkgPrefix: string | undefined\n\n if (shouldPatchPackages) {\n pkgPrefix = ''\n for (const pkg of Object.keys(lockfileParsed.packages)) {\n if (pkg.endsWith('node_modules/next')) {\n pkgPrefix = pkg.substring(0, pkg.length - 4)\n }\n }\n\n if (!pkgPrefix) {\n // unable to locate the next package so bail\n return\n }\n }\n\n for (const pkg of expectedSwcPkgs) {\n if (\n (shouldPatchDependencies && !lockfileParsed.dependencies[pkg]) ||\n (shouldPatchPackages && !lockfileParsed.packages[`${pkgPrefix}${pkg}`])\n ) {\n missingSwcPkgs.push(pkg)\n }\n }\n if (missingSwcPkgs.length === 0) {\n return\n }\n Log.warn(\n `Found lockfile missing swc dependencies,`,\n isCI ? 'run next locally to automatically patch' : 'patching...'\n )\n\n if (isCI) {\n // no point in updating in CI as the user can't save the patch\n return\n }\n const pkgsData = await Promise.all(\n missingSwcPkgs.map((pkg) => fetchPkgInfo(pkg))\n )\n\n for (let i = 0; i < pkgsData.length; i++) {\n const pkg = missingSwcPkgs[i]\n const pkgData = pkgsData[i]\n\n if (shouldPatchDependencies) {\n patchDependency(pkg, pkgData)\n }\n if (shouldPatchPackages) {\n patchPackage(`${pkgPrefix}${pkg}`, pkgData)\n }\n }\n\n writeFileSync(\n lockfilePath,\n JSON.stringify(lockfileParsed, null, 2) + endingNewline\n )\n Log.warn(\n 'Lockfile was successfully patched, please run \"npm install\" to ensure @next/swc dependencies are downloaded'\n )\n } catch (err) {\n Log.error(\n `Failed to patch lockfile, please try uninstalling and reinstalling next in this workspace`\n )\n console.error(err)\n }\n}\n"],"names":["readFileSync","writeFileSync","Log","findUp","optionalDependencies","nextOptionalDeps","isCI","getRegistry","registry","fetchPkgInfo","pkg","res","fetch","ok","Error","status","data","json","versionData","versions","process","env","__NEXT_VERSION","os","cpu","engines","tarball","dist","integrity","patchIncorrectLockfile","dir","NEXT_IGNORE_INCORRECT_LOCKFILE","lockfilePath","cwd","content","endingNewline","endsWith","lockfileParsed","JSON","parse","lockfileVersion","parseInt","expectedSwcPkgs","Object","keys","filter","startsWith","patchDependency","pkgData","dependencies","version","resolved","optional","patchPackage","packages","supportedVersions","includes","shouldPatchDependencies","shouldPatchPackages","missingSwcPkgs","pkgPrefix","substring","length","push","warn","pkgsData","Promise","all","map","i","stringify","err","error","console"],"mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,KAAI;AAChD,YAAYC,SAAS,sBAAqB;AAC1C,OAAOC,YAAY,6BAA4B;AAC/C,2BAA2B;AAC3B,SAASC,wBAAwBC,gBAAgB,QAAQ,oBAAmB;AAE5E,SAASC,IAAI,QAAQ,oBAAmB;AACxC,SAASC,WAAW,QAAQ,yBAAwB;AAEpD,IAAIC;AAEJ,eAAeC,aAAaC,GAAW;IACrC,IAAI,CAACF,UAAUA,WAAWD;IAC1B,MAAMI,MAAM,MAAMC,MAAM,GAAGJ,WAAWE,KAAK;IAE3C,IAAI,CAACC,IAAIE,EAAE,EAAE;QACX,MAAM,IAAIC,MACR,CAAC,kCAAkC,EAAEJ,IAAI,aAAa,EAAEC,IAAII,MAAM,EAAE;IAExE;IACA,MAAMC,OAAO,MAAML,IAAIM,IAAI;IAC3B,MAAMC,cAAcF,KAAKG,QAAQ,CAACC,QAAQC,GAAG,CAACC,cAAc,CAAW;IAEvE,OAAO;QACLC,IAAIL,YAAYK,EAAE;QAClBC,KAAKN,YAAYM,GAAG;QACpBC,SAASP,YAAYO,OAAO;QAC5BC,SAASR,YAAYS,IAAI,CAACD,OAAO;QACjCE,WAAWV,YAAYS,IAAI,CAACC,SAAS;IACvC;AACF;AAEA;;;;;CAKC,GACD,OAAO,eAAeC,uBAAuBC,GAAW;IACtD,IAAIV,QAAQC,GAAG,CAACU,8BAA8B,EAAE;QAC9C;IACF;IACA,MAAMC,eAAe,MAAM7B,OAAO,qBAAqB;QAAE8B,KAAKH;IAAI;IAElE,IAAI,CAACE,cAAc;QACjB,oDAAoD;QACpD;IACF;IACA,MAAME,UAAUlC,aAAagC,cAAc;IAC3C,+BAA+B;IAC/B,MAAMG,gBAAgBD,QAAQE,QAAQ,CAAC,UACnC,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of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/pick.js b/e-commerce/node_modules/next/dist/esm/lib/pick.js
new file mode 100644
index 0000000000000000000000000000000000000000..a2f9a6651eae0ea16e5221fd0f57aec2bf5bbf91
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/pick.js
@@ -0,0 +1,9 @@
+export function pick(obj, keys) {
+ const newObj = {};
+ for (const key of keys){
+ newObj[key] = obj[key];
+ }
+ return newObj;
+}
+
+//# sourceMappingURL=pick.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/pick.js.map b/e-commerce/node_modules/next/dist/esm/lib/pick.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..61b0fc761080ee1c282dbacf2200ecc899e9639d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/pick.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/pick.ts"],"sourcesContent":["export function pick(obj: T, keys: K[]): Pick {\n const newObj = {} as Pick\n for (const key of keys) {\n newObj[key] = obj[key]\n }\n return newObj\n}\n"],"names":["pick","obj","keys","newObj","key"],"mappings":"AAAA,OAAO,SAASA,KAA2BC,GAAM,EAAEC,IAAS;IAC1D,MAAMC,SAAS,CAAC;IAChB,KAAK,MAAMC,OAAOF,KAAM;QACtBC,MAAM,CAACC,IAAI,GAAGH,GAAG,CAACG,IAAI;IACxB;IACA,OAAOD;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/picocolors.js b/e-commerce/node_modules/next/dist/esm/lib/picocolors.js
new file mode 100644
index 0000000000000000000000000000000000000000..f1c5f9702989ec6833c968943af874218269ed1f
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/picocolors.js
@@ -0,0 +1,63 @@
+// ISC License
+// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+//
+// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
+var _globalThis;
+const { env, stdout } = ((_globalThis = globalThis) == null ? void 0 : _globalThis.process) ?? {};
+const enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || (stdout == null ? void 0 : stdout.isTTY) && !env.CI && env.TERM !== 'dumb');
+export const isColorSupported = Boolean(enabled);
+// Whether stdout ends up on a terminal: directly, or through the CLI, which
+// pipes a child's output while the upgrade menu is open.
+export const stdoutIsTerminal = Boolean(stdout == null ? void 0 : stdout.isTTY) || env.NEXT_PRIVATE_PROMPT_OUTPUT === '1';
+const replaceClose = (str, close, replace, index)=>{
+ const start = str.substring(0, index) + replace;
+ const end = str.substring(index + close.length);
+ const nextIndex = end.indexOf(close);
+ return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
+};
+const formatter = (open, close, replace = open)=>{
+ if (!enabled) return String;
+ return (input)=>{
+ const string = '' + input;
+ const index = string.indexOf(close, open.length);
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
+ };
+};
+export const reset = enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String;
+export const bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m');
+export const dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m');
+export const italic = formatter('\x1b[3m', '\x1b[23m');
+export const underline = formatter('\x1b[4m', '\x1b[24m');
+export const inverse = formatter('\x1b[7m', '\x1b[27m');
+export const hidden = formatter('\x1b[8m', '\x1b[28m');
+export const strikethrough = formatter('\x1b[9m', '\x1b[29m');
+export const black = formatter('\x1b[30m', '\x1b[39m');
+export const red = formatter('\x1b[31m', '\x1b[39m');
+export const green = formatter('\x1b[32m', '\x1b[39m');
+export const yellow = formatter('\x1b[33m', '\x1b[39m');
+export const blue = formatter('\x1b[34m', '\x1b[39m');
+export const magenta = formatter('\x1b[35m', '\x1b[39m');
+export const purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m');
+export const cyan = formatter('\x1b[36m', '\x1b[39m');
+export const white = formatter('\x1b[37m', '\x1b[39m');
+export const gray = formatter('\x1b[90m', '\x1b[39m');
+export const bgBlack = formatter('\x1b[40m', '\x1b[49m');
+export const bgRed = formatter('\x1b[41m', '\x1b[49m');
+export const bgGreen = formatter('\x1b[42m', '\x1b[49m');
+export const bgYellow = formatter('\x1b[43m', '\x1b[49m');
+export const bgBlue = formatter('\x1b[44m', '\x1b[49m');
+export const bgMagenta = formatter('\x1b[45m', '\x1b[49m');
+export const bgCyan = formatter('\x1b[46m', '\x1b[49m');
+export const bgWhite = formatter('\x1b[47m', '\x1b[49m');
+
+//# sourceMappingURL=picocolors.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/picocolors.js.map b/e-commerce/node_modules/next/dist/esm/lib/picocolors.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..7e10635390e4f07fc0078b8141d7956360c0ece7
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/picocolors.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/picocolors.ts"],"sourcesContent":["// ISC License\n\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n//\n// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1\n\nconst { env, stdout } = globalThis?.process ?? {}\n\nconst enabled =\n env &&\n !env.NO_COLOR &&\n (env.FORCE_COLOR || (stdout?.isTTY && !env.CI && env.TERM !== 'dumb'))\n\nexport const isColorSupported = Boolean(enabled)\n\n// Whether stdout ends up on a terminal: directly, or through the CLI, which\n// pipes a child's output while the upgrade menu is open.\nexport const stdoutIsTerminal =\n Boolean(stdout?.isTTY) || env.NEXT_PRIVATE_PROMPT_OUTPUT === '1'\n\nconst replaceClose = (\n str: string,\n close: string,\n replace: string,\n index: number\n): string => {\n const start = str.substring(0, index) + replace\n const end = str.substring(index + close.length)\n const nextIndex = end.indexOf(close)\n return ~nextIndex\n ? start + replaceClose(end, close, replace, nextIndex)\n : start + end\n}\n\nconst formatter = (open: string, close: string, replace = open) => {\n if (!enabled) return String\n return (input: string) => {\n const string = '' + input\n const index = string.indexOf(close, open.length)\n return ~index\n ? open + replaceClose(string, close, replace, index) + close\n : open + string + close\n }\n}\n\nexport const reset = enabled ? (s: string) => `\\x1b[0m${s}\\x1b[0m` : String\nexport const bold = formatter('\\x1b[1m', '\\x1b[22m', '\\x1b[22m\\x1b[1m')\nexport const dim = formatter('\\x1b[2m', '\\x1b[22m', '\\x1b[22m\\x1b[2m')\nexport const italic = formatter('\\x1b[3m', '\\x1b[23m')\nexport const underline = formatter('\\x1b[4m', '\\x1b[24m')\nexport const inverse = formatter('\\x1b[7m', '\\x1b[27m')\nexport const hidden = formatter('\\x1b[8m', '\\x1b[28m')\nexport const strikethrough = formatter('\\x1b[9m', '\\x1b[29m')\nexport const black = formatter('\\x1b[30m', '\\x1b[39m')\nexport const red = formatter('\\x1b[31m', '\\x1b[39m')\nexport const green = formatter('\\x1b[32m', '\\x1b[39m')\nexport const yellow = formatter('\\x1b[33m', '\\x1b[39m')\nexport const blue = formatter('\\x1b[34m', '\\x1b[39m')\nexport const magenta = formatter('\\x1b[35m', '\\x1b[39m')\nexport const purple = formatter('\\x1b[38;2;173;127;168m', '\\x1b[39m')\nexport const cyan = formatter('\\x1b[36m', '\\x1b[39m')\nexport const white = formatter('\\x1b[37m', '\\x1b[39m')\nexport const gray = formatter('\\x1b[90m', '\\x1b[39m')\nexport const bgBlack = formatter('\\x1b[40m', '\\x1b[49m')\nexport const bgRed = formatter('\\x1b[41m', '\\x1b[49m')\nexport const bgGreen = formatter('\\x1b[42m', '\\x1b[49m')\nexport const bgYellow = formatter('\\x1b[43m', '\\x1b[49m')\nexport const bgBlue = formatter('\\x1b[44m', '\\x1b[49m')\nexport const bgMagenta = formatter('\\x1b[45m', '\\x1b[49m')\nexport const bgCyan = formatter('\\x1b[46m', '\\x1b[49m')\nexport const bgWhite = formatter('\\x1b[47m', '\\x1b[49m')\n"],"names":["globalThis","env","stdout","process","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","isColorSupported","Boolean","stdoutIsTerminal","NEXT_PRIVATE_PROMPT_OUTPUT","replaceClose","str","close","replace","index","start","substring","end","length","nextIndex","indexOf","formatter","open","String","input","string","reset","s","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","purple","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite"],"mappings":"AAAA,cAAc;AAEd,wEAAwE;AAExE,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AAEpE,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,iEAAiE;AACjE,EAAE;AACF,8GAA8G;IAEtFA;AAAxB,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAE,GAAGF,EAAAA,cAAAA,+BAAAA,YAAYG,OAAO,KAAI,CAAC;AAEhD,MAAMC,UACJH,OACA,CAACA,IAAII,QAAQ,IACZJ,CAAAA,IAAIK,WAAW,IAAKJ,CAAAA,0BAAAA,OAAQK,KAAK,KAAI,CAACN,IAAIO,EAAE,IAAIP,IAAIQ,IAAI,KAAK,MAAM;AAEtE,OAAO,MAAMC,mBAAmBC,QAAQP,SAAQ;AAEhD,4EAA4E;AAC5E,yDAAyD;AACzD,OAAO,MAAMQ,mBACXD,QAAQT,0BAAAA,OAAQK,KAAK,KAAKN,IAAIY,0BAA0B,KAAK,IAAG;AAElE,MAAMC,eAAe,CACnBC,KACAC,OACAC,SACAC;IAEA,MAAMC,QAAQJ,IAAIK,SAAS,CAAC,GAAGF,SAASD;IACxC,MAAMI,MAAMN,IAAIK,SAAS,CAACF,QAAQF,MAAMM,MAAM;IAC9C,MAAMC,YAAYF,IAAIG,OAAO,CAACR;IAC9B,OAAO,CAACO,YACJJ,QAAQL,aAAaO,KAAKL,OAAOC,SAASM,aAC1CJ,QAAQE;AACd;AAEA,MAAMI,YAAY,CAACC,MAAcV,OAAeC,UAAUS,IAAI;IAC5D,IAAI,CAACtB,SAAS,OAAOuB;IACrB,OAAO,CAACC;QACN,MAAMC,SAAS,KAAKD;QACpB,MAAMV,QAAQW,OAAOL,OAAO,CAACR,OAAOU,KAAKJ,MAAM;QAC/C,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OAAO,MAAM6B,YAAY7B,UAAU,YAAY,YAAW;AAC1D,OAAO,MAAM8B,SAAS9B,UAAU,YAAY,YAAW;AACvD,OAAO,MAAM+B,UAAU/B,UAAU,YAAY,YAAW","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/pretty-bytes.js b/e-commerce/node_modules/next/dist/esm/lib/pretty-bytes.js
new file mode 100644
index 0000000000000000000000000000000000000000..62f0b18f2a50f9ba82521cc70abbcae427158ed4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/pretty-bytes.js
@@ -0,0 +1,60 @@
+/*
+MIT License
+
+Copyright (c) Sindre Sorhus (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/ const UNITS = [
+ 'B',
+ 'kB',
+ 'MB',
+ 'GB',
+ 'TB',
+ 'PB',
+ 'EB',
+ 'ZB',
+ 'YB'
+];
+/*
+Formats the given number using `Number#toLocaleString`.
+- If locale is a string, the value is expected to be a locale-key (for example: `de`).
+- If locale is true, the system default locale is used for translation.
+- If no value for locale is specified, the number is returned unmodified.
+*/ const toLocaleString = (number, locale)=>{
+ let result = number;
+ if (typeof locale === 'string') {
+ result = number.toLocaleString(locale);
+ } else if (locale === true) {
+ result = number.toLocaleString();
+ }
+ return result;
+};
+export default function prettyBytes(number, options) {
+ if (!Number.isFinite(number)) {
+ throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
+ }
+ options = Object.assign({}, options);
+ if (options.signed && number === 0) {
+ return ' 0 B';
+ }
+ const isNegative = number < 0;
+ const prefix = isNegative ? '-' : options.signed ? '+' : '';
+ if (isNegative) {
+ number = -number;
+ }
+ if (number < 1) {
+ const numberString = toLocaleString(number, options.locale);
+ return prefix + numberString + ' B';
+ }
+ const exponent = Math.min(Math.floor(Math.log10(number) / 3), UNITS.length - 1);
+ number = Number((number / Math.pow(1000, exponent)).toPrecision(3));
+ const numberString = toLocaleString(number, options.locale);
+ const unit = UNITS[exponent];
+ return prefix + numberString + ' ' + unit;
+}
+
+//# sourceMappingURL=pretty-bytes.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/pretty-bytes.js.map b/e-commerce/node_modules/next/dist/esm/lib/pretty-bytes.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..7b8b7c0d5ea0a96ab348b0a961a7cd2561144f15
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/pretty-bytes.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/pretty-bytes.ts"],"sourcesContent":["/*\nMIT License\n\nCopyright (c) Sindre Sorhus (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\nconst UNITS = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number: number, locale: any) => {\n let result: any = number\n if (typeof locale === 'string') {\n result = number.toLocaleString(locale)\n } else if (locale === true) {\n result = number.toLocaleString()\n }\n\n return result\n}\n\nexport default function prettyBytes(number: number, options?: any): string {\n if (!Number.isFinite(number)) {\n throw new TypeError(\n `Expected a finite number, got ${typeof number}: ${number}`\n )\n }\n\n options = Object.assign({}, options)\n\n if (options.signed && number === 0) {\n return ' 0 B'\n }\n\n const isNegative = number < 0\n const prefix = isNegative ? '-' : options.signed ? '+' : ''\n\n if (isNegative) {\n number = -number\n }\n\n if (number < 1) {\n const numberString = toLocaleString(number, options.locale)\n return prefix + numberString + ' B'\n }\n\n const exponent = Math.min(\n Math.floor(Math.log10(number) / 3),\n UNITS.length - 1\n )\n\n number = Number((number / Math.pow(1000, exponent)).toPrecision(3))\n const numberString = toLocaleString(number, options.locale)\n\n const unit = UNITS[exponent]\n\n return prefix + numberString + ' ' + unit\n}\n"],"names":["UNITS","toLocaleString","number","locale","result","prettyBytes","options","Number","isFinite","TypeError","Object","assign","signed","isNegative","prefix","numberString","exponent","Math","min","floor","log10","length","pow","toPrecision","unit"],"mappings":"AAAA;;;;;;;;;;AAUA,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e-commerce/node_modules/next/dist/esm/lib/profiles-dir.js
new file mode 100644
index 0000000000000000000000000000000000000000..7e4b942f7eb5bb9db5699530483d9223be369ece
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/profiles-dir.js
@@ -0,0 +1,40 @@
+import { existsSync, mkdirSync, writeFileSync } from 'fs';
+import { join } from 'path';
+/**
+ * Name of the directory at the project root where profiling output (CPU
+ * profiles and Turbopack traces) is written when profiling is enabled (see the
+ * `--experimental-cpu-prof` and `--internal-trace` CLI flags). It is a
+ * fixed-name sibling of `distDir`, not configurable.
+ *
+ * Keep this in sync with `DIST_PROFILES_DIR_NAME` in
+ * `crates/next-core/src/next_config.rs`.
+ */ export const PROFILES_DIR_NAME = '.next-profiles';
+const GITIGNORE_CONTENTS = `# Created automatically by Next.js. Profiling output should not be committed.
+*
+`;
+/**
+ * Create the `.next-profiles` directory under `dir` and return its absolute
+ * path. This is the single place that creates the directory — the Rust trace
+ * writer relies on it already existing.
+ *
+ * Also writes a `.gitignore` containing `*` (if one isn't already there) so the
+ * potentially large profiling output is excluded from git and gitignore-aware
+ * tools (Tailwind, Turborepo, ...) skip the subtree instead of reading it and
+ * hanging/OOMing.
+ */ export function ensureProfilesDir(dir) {
+ const profilesDir = join(dir, PROFILES_DIR_NAME);
+ mkdirSync(profilesDir, {
+ recursive: true
+ });
+ const gitignorePath = join(profilesDir, '.gitignore');
+ if (!existsSync(gitignorePath)) {
+ try {
+ writeFileSync(gitignorePath, GITIGNORE_CONTENTS);
+ } catch {
+ // A missing .gitignore must not abort a profiling run.
+ }
+ }
+ return profilesDir;
+}
+
+//# sourceMappingURL=profiles-dir.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/profiles-dir.js.map b/e-commerce/node_modules/next/dist/esm/lib/profiles-dir.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..dbc55b1680873b3a0a28a6294546f467f1b34306
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/profiles-dir.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/profiles-dir.ts"],"sourcesContent":["import { existsSync, mkdirSync, writeFileSync } from 'fs'\nimport { join } from 'path'\n\n/**\n * Name of the directory at the project root where profiling output (CPU\n * profiles and Turbopack traces) is written when profiling is enabled (see the\n * `--experimental-cpu-prof` and `--internal-trace` CLI flags). It is a\n * fixed-name sibling of `distDir`, not configurable.\n *\n * Keep this in sync with `DIST_PROFILES_DIR_NAME` in\n * `crates/next-core/src/next_config.rs`.\n */\nexport const PROFILES_DIR_NAME = '.next-profiles'\n\nconst GITIGNORE_CONTENTS = `# Created automatically by Next.js. Profiling output should not be committed.\n*\n`\n\n/**\n * Create the `.next-profiles` directory under `dir` and return its absolute\n * path. This is the single place that creates the directory — the Rust trace\n * writer relies on it already existing.\n *\n * Also writes a `.gitignore` containing `*` (if one isn't already there) so the\n * potentially large profiling output is excluded from git and gitignore-aware\n * tools (Tailwind, Turborepo, ...) skip the subtree instead of reading it and\n * hanging/OOMing.\n */\nexport function ensureProfilesDir(dir: string): string {\n const profilesDir = join(dir, PROFILES_DIR_NAME)\n mkdirSync(profilesDir, { recursive: true })\n const gitignorePath = join(profilesDir, '.gitignore')\n if (!existsSync(gitignorePath)) {\n try {\n writeFileSync(gitignorePath, GITIGNORE_CONTENTS)\n } catch {\n // A missing .gitignore must not abort a profiling run.\n }\n }\n return profilesDir\n}\n"],"names":["existsSync","mkdirSync","writeFileSync","join","PROFILES_DIR_NAME","GITIGNORE_CONTENTS","ensureProfilesDir","dir","profilesDir","recursive","gitignorePath"],"mappings":"AAAA,SAASA,UAAU,EAAEC,SAAS,EAAEC,aAAa,QAAQ,KAAI;AACzD,SAASC,IAAI,QAAQ,OAAM;AAE3B;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,iBAAgB;AAEjD,MAAMC,qBAAqB,CAAC;;AAE5B,CAAC;AAED;;;;;;;;;CASC,GACD,OAAO,SAASC,kBAAkBC,GAAW;IAC3C,MAAMC,cAAcL,KAAKI,KAAKH;IAC9BH,UAAUO,aAAa;QAAEC,WAAW;IAAK;IACzC,MAAMC,gBAAgBP,KAAKK,aAAa;IACxC,IAAI,CAACR,WAAWU,gBAAgB;QAC9B,IAAI;YACFR,cAAcQ,eAAeL;QAC/B,EAAE,OAAM;QACN,uDAAuD;QACzD;IACF;IACA,OAAOG;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/realpath.js b/e-commerce/node_modules/next/dist/esm/lib/realpath.js
new file mode 100644
index 0000000000000000000000000000000000000000..fc83501c3409d4afb971930b3ece3184ad8cb559
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/realpath.js
@@ -0,0 +1,9 @@
+import fs from 'fs';
+const isWindows = process.platform === 'win32';
+// Interesting learning from this, that fs.realpathSync is 70x slower than fs.realpathSync.native:
+// https://sun0day.github.io/blog/vite/why-vite4_3-is-faster.html#fs-realpathsync-issue
+// https://github.com/nodejs/node/issues/2680
+// However, we can't use fs.realpathSync.native on Windows due to behavior differences.
+export const realpathSync = isWindows ? fs.realpathSync : fs.realpathSync.native;
+
+//# sourceMappingURL=realpath.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/realpath.js.map b/e-commerce/node_modules/next/dist/esm/lib/realpath.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..6d8f8fd94bc6af9b84c2a9374d6fde01520cac01
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/realpath.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/realpath.ts"],"sourcesContent":["import fs from 'fs'\n\nconst isWindows = process.platform === 'win32'\n\n// Interesting learning from this, that fs.realpathSync is 70x slower than fs.realpathSync.native:\n// https://sun0day.github.io/blog/vite/why-vite4_3-is-faster.html#fs-realpathsync-issue\n// https://github.com/nodejs/node/issues/2680\n// However, we can't use fs.realpathSync.native on Windows due to behavior differences.\nexport const realpathSync = isWindows ? fs.realpathSync : fs.realpathSync.native\n"],"names":["fs","isWindows","process","platform","realpathSync","native"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AAEnB,MAAMC,YAAYC,QAAQC,QAAQ,KAAK;AAEvC,kGAAkG;AAClG,uFAAuF;AACvF,6CAA6C;AAC7C,uFAAuF;AACvF,OAAO,MAAMC,eAAeH,YAAYD,GAAGI,YAAY,GAAGJ,GAAGI,YAAY,CAACC,MAAM,CAAA","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/recursive-copy.js b/e-commerce/node_modules/next/dist/esm/lib/recursive-copy.js
new file mode 100644
index 0000000000000000000000000000000000000000..71dbd49158a99f99708de451f1dac21bd1ed6de2
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/recursive-copy.js
@@ -0,0 +1,61 @@
+import path from 'path';
+import { promises, constants } from 'fs';
+import { Sema } from 'next/dist/compiled/async-sema';
+import isError from './is-error';
+const COPYFILE_EXCL = constants.COPYFILE_EXCL;
+export async function recursiveCopy(source, dest, { concurrency = 32, overwrite = false, filter = ()=>true } = {}) {
+ const cwdPath = process.cwd();
+ const from = path.resolve(cwdPath, source);
+ const to = path.resolve(cwdPath, dest);
+ const sema = new Sema(concurrency);
+ // deep copy the file/directory
+ async function _copy(item, lstats) {
+ const target = item.replace(from, to);
+ await sema.acquire();
+ if (!lstats) {
+ // after lock on first run
+ lstats = await promises.lstat(from);
+ }
+ // readdir & lstat do not follow symbolic links
+ // if part is a symbolic link, follow it with stat
+ let isFile = lstats.isFile();
+ let isDirectory = lstats.isDirectory();
+ if (lstats.isSymbolicLink()) {
+ const stats = await promises.stat(item);
+ isFile = stats.isFile();
+ isDirectory = stats.isDirectory();
+ }
+ if (isDirectory) {
+ try {
+ await promises.mkdir(target, {
+ recursive: true
+ });
+ } catch (err) {
+ // do not throw `folder already exists` errors
+ if (isError(err) && err.code !== 'EEXIST') {
+ throw err;
+ }
+ }
+ sema.release();
+ const files = await promises.readdir(item, {
+ withFileTypes: true
+ });
+ await Promise.all(files.map((file)=>_copy(path.join(item, file.name), file)));
+ } else if (isFile && // before we send the path to filter
+ // we remove the base path (from) and replace \ by / (windows)
+ filter(item.replace(from, '').replace(/\\/g, '/'))) {
+ await promises.copyFile(item, target, overwrite ? undefined : COPYFILE_EXCL).catch((err)=>{
+ // if overwrite is false we shouldn't fail on EEXIST
+ if (err.code !== 'EEXIST') {
+ throw err;
+ }
+ });
+ sema.release();
+ } else {
+ sema.release();
+ }
+ }
+ await _copy(from);
+}
+
+//# sourceMappingURL=recursive-copy.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/recursive-copy.js.map b/e-commerce/node_modules/next/dist/esm/lib/recursive-copy.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..8c8d2ac6f5666dc8c743fed190c13565276e959e
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/recursive-copy.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/recursive-copy.ts"],"sourcesContent":["import path from 'path'\nimport type { Dirent, Stats } from 'fs'\nimport { promises, constants } from 'fs'\nimport { Sema } from 'next/dist/compiled/async-sema'\nimport isError from './is-error'\n\nconst COPYFILE_EXCL = constants.COPYFILE_EXCL\n\nexport async function recursiveCopy(\n source: string,\n dest: string,\n {\n concurrency = 32,\n overwrite = false,\n filter = () => true,\n }: {\n concurrency?: number\n overwrite?: boolean\n filter?(filePath: string): boolean\n } = {}\n): Promise {\n const cwdPath = process.cwd()\n const from = path.resolve(cwdPath, source)\n const to = path.resolve(cwdPath, dest)\n\n const sema = new Sema(concurrency)\n\n // deep copy the file/directory\n async function _copy(item: string, lstats?: Stats | Dirent): Promise {\n const target = item.replace(from, to)\n\n await sema.acquire()\n\n if (!lstats) {\n // after lock on first run\n lstats = await promises.lstat(from)\n }\n\n // readdir & lstat do not follow symbolic links\n // if part is a symbolic link, follow it with stat\n let isFile = lstats.isFile()\n let isDirectory = lstats.isDirectory()\n if (lstats.isSymbolicLink()) {\n const stats = await promises.stat(item)\n isFile = stats.isFile()\n isDirectory = stats.isDirectory()\n }\n\n if (isDirectory) {\n try {\n await promises.mkdir(target, { recursive: true })\n } catch (err) {\n // do not throw `folder already exists` errors\n if (isError(err) && err.code !== 'EEXIST') {\n throw err\n }\n }\n sema.release()\n const files = await promises.readdir(item, { withFileTypes: true })\n await Promise.all(\n files.map((file) => _copy(path.join(item, file.name), file))\n )\n } else if (\n isFile &&\n // before we send the path to filter\n // we remove the base path (from) and replace \\ by / (windows)\n filter(item.replace(from, '').replace(/\\\\/g, '/'))\n ) {\n await promises\n .copyFile(item, target, overwrite ? undefined : COPYFILE_EXCL)\n .catch((err) => {\n // if overwrite is false we shouldn't fail on EEXIST\n if (err.code !== 'EEXIST') {\n throw err\n }\n })\n sema.release()\n } else {\n sema.release()\n }\n }\n\n await _copy(from)\n}\n"],"names":["path","promises","constants","Sema","isError","COPYFILE_EXCL","recursiveCopy","source","dest","concurrency","overwrite","filter","cwdPath","process","cwd","from","resolve","to","sema","_copy","item","lstats","target","replace","acquire","lstat","isFile","isDirectory","isSymbolicLink","stats","stat","mkdir","recursive","err","code","release","files","readdir","withFileTypes","Promise","all","map","file","join","name","copyFile","undefined","catch"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AAEvB,SAASC,QAAQ,EAAEC,SAAS,QAAQ,KAAI;AACxC,SAASC,IAAI,QAAQ,gCAA+B;AACpD,OAAOC,aAAa,aAAY;AAEhC,MAAMC,gBAAgBH,UAAUG,aAAa;AAE7C,OAAO,eAAeC,cACpBC,MAAc,EACdC,IAAY,EACZ,EACEC,cAAc,EAAE,EAChBC,YAAY,KAAK,EACjBC,SAAS,IAAM,IAAI,EAKpB,GAAG,CAAC,CAAC;IAEN,MAAMC,UAAUC,QAAQC,GAAG;IAC3B,MAAMC,OAAOf,KAAKgB,OAAO,CAACJ,SAASL;IACnC,MAAMU,KAAKjB,KAAKgB,OAAO,CAACJ,SAASJ;IAEjC,MAAMU,OA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QACd,OAAO;YACLjB,KAAKiB,OAAO;QACd;IACF;IAEA,MAAMhB,MAAMJ;AACd","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/recursive-delete.js b/e-commerce/node_modules/next/dist/esm/lib/recursive-delete.js
new file mode 100644
index 0000000000000000000000000000000000000000..4b22486e60b156b44f9d53f947ab3ecb06177013
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/recursive-delete.js
@@ -0,0 +1,120 @@
+import * as fs from 'node:fs';
+import { join } from 'node:path';
+import isError from './is-error';
+import { wait } from './wait';
+// We use an exponential backoff. See the unit test for example values.
+//
+// - Node's `fs` module uses a linear backoff, starting with 100ms.
+// - Rust tries 64 times with only a `thread::yield_now` in between.
+//
+// We want something more aggressive, as `recursiveDelete` is in the critical
+// path of `next dev` and `next build` startup.
+const INITIAL_RETRY_MS = 8;
+const MAX_RETRY_MS = 64;
+const MAX_RETRIES = 6;
+/**
+ * Used in unit test.
+ * @ignore
+ */ export function calcBackoffMs(attempt) {
+ return Math.min(INITIAL_RETRY_MS * Math.pow(2, attempt), MAX_RETRY_MS);
+}
+function unlinkPath(p, isDir = false, attempt = 0) {
+ try {
+ if (isDir) {
+ fs.rmdirSync(p);
+ } else {
+ fs.unlinkSync(p);
+ }
+ } catch (e) {
+ const code = isError(e) && e.code;
+ if ((code === 'EBUSY' || code === 'ENOTEMPTY' || code === 'EPERM' || code === 'EMFILE') && attempt < MAX_RETRIES) {
+ // retrying is unlikely to succeed on POSIX platforms, but Windows can
+ // fail due to temporarily-open files
+ return (async ()=>{
+ await wait(calcBackoffMs(attempt));
+ return unlinkPath(p, isDir, attempt + 1);
+ })();
+ }
+ if (code === 'ENOENT') {
+ return;
+ }
+ throw e;
+ }
+}
+const FUTURE_MTIME_TOLERANCE_MS = 60 * 60 * 1000;
+/** Returns whether `p`'s own mtime falls outside the retained time range. */ function isStale(p, staleBefore, futureMtimeThreshold) {
+ try {
+ // lstat, not stat: a symlink is deleted based on its own age, not its
+ // target's.
+ const mtimeMs = fs.lstatSync(p).mtimeMs;
+ return mtimeMs <= staleBefore || mtimeMs > futureMtimeThreshold;
+ } catch (e) {
+ if (isError(e) && e.code === 'ENOENT') {
+ return false;
+ }
+ throw e;
+ }
+}
+/**
+ * Recursively delete directory contents.
+ *
+ * This is used when cleaning the `distDir`, and is part of the critical path
+ * for starting the server, so we use synchronous file IO, as we're always
+ * blocked on it anyways.
+ *
+ * Despite using sync IO, the function signature is still `async` because we
+ * asynchronously perform retries.
+ */ export async function recursiveDeleteSyncWithAsyncRetries(/** Directory to delete the contents of */ dir, /** Exclude based on relative file path */ exclude, /**
+ * Only delete files whose mtime is at least this old. Directories are
+ * removed once empty.
+ */ maxAgeMs) {
+ const now = Date.now();
+ await deleteContents(dir, {
+ exclude,
+ staleBefore: maxAgeMs === undefined ? undefined : now - maxAgeMs,
+ futureMtimeThreshold: now + FUTURE_MTIME_TOLERANCE_MS
+ });
+}
+/** @returns whether anything was kept. */ async function deleteContents(dir, { exclude, staleBefore, futureMtimeThreshold, previousPath }) {
+ let result;
+ try {
+ result = fs.readdirSync(dir, {
+ withFileTypes: true
+ });
+ } catch (e) {
+ if (isError(e) && e.code === 'ENOENT') {
+ return false;
+ }
+ throw e;
+ }
+ let keptAnything = false;
+ await Promise.all(result.map(async (part)=>{
+ const absolutePath = join(dir, part.name);
+ const pp = join(previousPath ?? '', part.name);
+ if (exclude == null ? void 0 : exclude.has(pp)) {
+ keptAnything = true;
+ return;
+ }
+ // Note: readdir does not follow symbolic links, that's good: we want to
+ // delete the links and not the destination.
+ const isDirectory = part.isDirectory();
+ if (isDirectory) {
+ if (await deleteContents(absolutePath, {
+ exclude,
+ staleBefore,
+ futureMtimeThreshold,
+ previousPath: pp
+ })) {
+ keptAnything = true;
+ return;
+ }
+ } else if (staleBefore !== undefined && !isStale(absolutePath, staleBefore, futureMtimeThreshold)) {
+ keptAnything = true;
+ return;
+ }
+ return unlinkPath(absolutePath, isDirectory);
+ }));
+ return keptAnything;
+}
+
+//# sourceMappingURL=recursive-delete.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/recursive-delete.js.map b/e-commerce/node_modules/next/dist/esm/lib/recursive-delete.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ff75a8fb55fe4ca5aad127e8564f42f66c2f0109
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/recursive-delete.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/recursive-delete.ts"],"sourcesContent":["import type { Dirent } from 'node:fs'\nimport * as fs from 'node:fs'\nimport { join } from 'node:path'\nimport isError from './is-error'\nimport { wait } from './wait'\n\n// We use an exponential backoff. See the unit test for example values.\n//\n// - Node's `fs` module uses a linear backoff, starting with 100ms.\n// - Rust tries 64 times with only a `thread::yield_now` in between.\n//\n// We want something more aggressive, as `recursiveDelete` is in the critical\n// path of `next dev` and `next build` startup.\nconst INITIAL_RETRY_MS = 8\nconst MAX_RETRY_MS = 64\nconst MAX_RETRIES = 6\n\n/**\n * Used in unit test.\n * @ignore\n */\nexport function calcBackoffMs(attempt: number): number {\n return Math.min(INITIAL_RETRY_MS * Math.pow(2, attempt), MAX_RETRY_MS)\n}\n\nfunction unlinkPath(\n p: string,\n isDir = false,\n attempt = 0\n): Promise | void {\n try {\n if (isDir) {\n fs.rmdirSync(p)\n } else {\n fs.unlinkSync(p)\n }\n } catch (e) {\n const code = isError(e) && e.code\n if (\n (code === 'EBUSY' ||\n code === 'ENOTEMPTY' ||\n code === 'EPERM' ||\n code === 'EMFILE') &&\n attempt < MAX_RETRIES\n ) {\n // retrying is unlikely to succeed on POSIX platforms, but Windows can\n // fail due to temporarily-open files\n return (async () => {\n await wait(calcBackoffMs(attempt))\n return unlinkPath(p, isDir, attempt + 1)\n })()\n }\n\n if (code === 'ENOENT') {\n return\n }\n\n throw e\n }\n}\n\nconst FUTURE_MTIME_TOLERANCE_MS = 60 * 60 * 1000\n\n/** Returns whether `p`'s own mtime falls outside the retained time range. */\nfunction isStale(\n p: string,\n staleBefore: number,\n futureMtimeThreshold: number\n): boolean {\n try {\n // lstat, not stat: a symlink is deleted based on its own age, not its\n // target's.\n const mtimeMs = fs.lstatSync(p).mtimeMs\n return mtimeMs <= staleBefore || mtimeMs > futureMtimeThreshold\n } catch (e) {\n if (isError(e) && e.code === 'ENOENT') {\n return false\n }\n throw e\n }\n}\n\n/**\n * Recursively delete directory contents.\n *\n * This is used when cleaning the `distDir`, and is part of the critical path\n * for starting the server, so we use synchronous file IO, as we're always\n * blocked on it anyways.\n *\n * Despite using sync IO, the function signature is still `async` because we\n * asynchronously perform retries.\n */\nexport async function recursiveDeleteSyncWithAsyncRetries(\n /** Directory to delete the contents of */\n dir: string,\n /** Exclude based on relative file path */\n exclude?: ReadonlySet,\n /**\n * Only delete files whose mtime is at least this old. Directories are\n * removed once empty.\n */\n maxAgeMs?: number\n): Promise {\n const now = Date.now()\n await deleteContents(dir, {\n exclude,\n staleBefore: maxAgeMs === undefined ? undefined : now - maxAgeMs,\n futureMtimeThreshold: now + FUTURE_MTIME_TOLERANCE_MS,\n })\n}\n\n/** @returns whether anything was kept. */\nasync function deleteContents(\n dir: string,\n {\n exclude,\n staleBefore,\n futureMtimeThreshold,\n previousPath,\n }: {\n exclude: ReadonlySet | undefined\n staleBefore: number | undefined\n futureMtimeThreshold: number\n /** Relative path to the directory being deleted, used for exclude */\n previousPath?: string\n }\n): Promise {\n let result\n try {\n result = fs.readdirSync(dir, { withFileTypes: true })\n } catch (e) {\n if (isError(e) && e.code === 'ENOENT') {\n return false\n }\n throw e\n }\n\n let keptAnything = false\n\n await Promise.all(\n result.map(async (part: Dirent) => {\n const absolutePath = join(dir, part.name)\n const pp = join(previousPath ?? '', part.name)\n\n if (exclude?.has(pp)) {\n keptAnything = true\n return\n }\n\n // Note: readdir does not follow symbolic links, that's good: we want to\n // delete the links and not the destination.\n const isDirectory = part.isDirectory()\n if (isDirectory) {\n if (\n await deleteContents(absolutePath, {\n exclude,\n staleBefore,\n futureMtimeThreshold,\n previousPath: pp,\n })\n ) {\n keptAnything = true\n return\n }\n } else if (\n staleBefore !== undefined &&\n !isStale(absolutePath, staleBefore, futureMtimeThreshold)\n ) {\n keptAnything = true\n return\n }\n\n return unlinkPath(absolutePath, isDirectory)\n })\n )\n return keptAnything\n}\n"],"names":["fs","join","isError","wait","INITIAL_RETRY_MS","MAX_RETRY_MS","MAX_RETRIES","calcBackoffMs","attempt","Math","min","pow","unlinkPath","p","isDir","rmdirSync","unlinkSync","e","code","FUTURE_MTIME_TOLERANCE_MS","isStale","staleBefore","futureMtimeThreshold","mtimeMs","lstatSync","recursiveDeleteSyncWithAsyncRetries","dir","exclude","maxAgeMs","now","Date","deleteContents","undefined","previousPath","result","readdirSync","withFileTypes","keptAnything","Promise","all","map","part","absolutePath","name","pp","has","isDirectory"],"mappings":"AACA,YAAYA,QAAQ,UAAS;AAC7B,SAASC,IAAI,QAAQ,YAAW;AAChC,OAAOC,aAAa,aAAY;AAChC,SAASC,IAAI,QAAQ,SAAQ;AAE7B,uEAAuE;AACvE,EAAE;AACF,mEAAmE;AACnE,oEAAoE;AACpE,EAAE;AACF,6EAA6E;AAC7E,+CAA+C;AAC/C,MAAMC,mBAAmB;AACzB,MAAMC,eAAe;AACrB,MAAMC,cAAc;AAEpB;;;CAGC,GACD,OAAO,SAASC,cAAcC,OAAe;IAC3C,OAAOC,KAAKC,GAAG,CAACN,mBAAmBK,KAAKE,GAAG,CAAC,GAAGH,UAAUH;AAC3D;AAEA,SAASO,WACPC,CAAS,EACTC,QAAQ,KAAK,EACbN,UAAU,CAAC;IAEX,IAAI;QACF,IAAIM,OAAO;YACTd,GAAGe,SAAS,CAACF;QACf,OAAO;YACLb,GAAGgB,UAAU,CAACH;QAChB;IACF,EAAE,OAAOI,GAAG;QACV,MAAMC,OAAOhB,QAAQe,MAAMA,EAAEC,IAAI;QACjC,IACE,AAACA,CAAAA,SAAS,WACRA,SAAS,eACTA,SAAS,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AChB,MAAMC,eAAezC,KAAKyB,KAAKe,KAAKE,IAAI;QACxC,MAAMC,KAAK3C,KAAKgC,gBAAgB,IAAIQ,KAAKE,IAAI;QAE7C,IAAIhB,2BAAAA,QAASkB,GAAG,CAACD,KAAK;YACpBP,eAAe;YACf;QACF;QAEA,wEAAwE;QACxE,4CAA4C;QAC5C,MAAMS,cAAcL,KAAKK,WAAW;QACpC,IAAIA,aAAa;YACf,IACE,MAAMf,eAAeW,cAAc;gBACjCf;gBACAN;gBACAC;gBACAW,cAAcW;YAChB,IACA;gBACAP,eAAe;gBACf;YACF;QACF,OAAO,IACLhB,gBAAgBW,aAChB,CAACZ,QAAQsB,cAAcrB,aAAaC,uBACpC;YACAe,eAAe;YACf;QACF;QAEA,OAAOzB,WAAW8B,cAAcI;IAClC;IAEF,OAAOT;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/recursive-readdir.js b/e-commerce/node_modules/next/dist/esm/lib/recursive-readdir.js
new file mode 100644
index 0000000000000000000000000000000000000000..f38de12da18c4b1a32e7efb460fbbff942af35a2
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/recursive-readdir.js
@@ -0,0 +1,115 @@
+import fs from 'fs/promises';
+import path from 'path';
+/**
+ * Recursively reads a directory and returns the list of pathnames.
+ *
+ * @param rootDirectory the directory to read
+ * @param options options to control the behavior of the recursive read
+ * @returns the list of pathnames
+ */ export async function recursiveReadDir(rootDirectory, options = {}) {
+ // Grab our options.
+ const { pathnameFilter, ignoreFilter, ignorePartFilter, sortPathnames = true, relativePathnames = true } = options;
+ // The list of pathnames to return.
+ const pathnames = [];
+ /**
+ * Coerces the pathname to be relative if requested.
+ */ const coerce = relativePathnames ? (pathname)=>pathname.replace(rootDirectory, '') : (pathname)=>pathname;
+ // The queue of directories to scan.
+ let directories = [
+ rootDirectory
+ ];
+ while(directories.length > 0){
+ // Load all the files in each directory at the same time.
+ const results = await Promise.all(directories.map(async (directory)=>{
+ const result = {
+ directories: [],
+ pathnames: [],
+ links: []
+ };
+ try {
+ const dir = await fs.readdir(directory, {
+ withFileTypes: true
+ });
+ for (const file of dir){
+ // If enabled, ignore the file if it matches the ignore filter.
+ if (ignorePartFilter && ignorePartFilter(file.name)) {
+ continue;
+ }
+ // Handle each file.
+ const absolutePathname = path.join(directory, file.name);
+ // If enabled, ignore the file if it matches the ignore filter.
+ if (ignoreFilter && ignoreFilter(absolutePathname)) {
+ continue;
+ }
+ // If the file is a directory, then add it to the list of directories,
+ // they'll be scanned on a later pass.
+ if (file.isDirectory()) {
+ result.directories.push(absolutePathname);
+ } else if (file.isSymbolicLink()) {
+ result.links.push(absolutePathname);
+ } else if (!pathnameFilter || pathnameFilter(absolutePathname)) {
+ result.pathnames.push(coerce(absolutePathname));
+ }
+ }
+ } catch (err) {
+ // This can only happen when the underlying directory was removed. If
+ // anything other than this error occurs, re-throw it.
+ // if (err.code !== 'ENOENT') throw err
+ if (err.code !== 'ENOENT' || directory === rootDirectory) throw err;
+ // The error occurred, so abandon reading this directory.
+ return null;
+ }
+ return result;
+ }));
+ // Empty the directories, we'll fill it later if some of the files are
+ // directories.
+ directories = [];
+ // Keep track of any symbolic links we find, we'll resolve them later.
+ const links = [];
+ // For each result of directory scans...
+ for (const result of results){
+ // If the directory was removed, then skip it.
+ if (!result) continue;
+ // Add any directories to the list of directories to scan.
+ directories.push(...result.directories);
+ // Add any symbolic links to the list of symbolic links to resolve.
+ links.push(...result.links);
+ // Add any file pathnames to the list of pathnames.
+ pathnames.push(...result.pathnames);
+ }
+ // Resolve all the symbolic links we found if any.
+ if (links.length > 0) {
+ const resolved = await Promise.all(links.map(async (absolutePathname)=>{
+ try {
+ return await fs.stat(absolutePathname);
+ } catch (err) {
+ // This can only happen when the underlying link was removed. If
+ // anything other than this error occurs, re-throw it.
+ if (err.code !== 'ENOENT') throw err;
+ // The error occurred, so abandon reading this directory.
+ return null;
+ }
+ }));
+ for(let i = 0; i < links.length; i++){
+ const stats = resolved[i];
+ // If the link was removed, then skip it.
+ if (!stats) continue;
+ // We would have already ignored the file if it matched the ignore
+ // filter, so we don't need to check it again.
+ const absolutePathname = links[i];
+ if (stats.isDirectory()) {
+ directories.push(absolutePathname);
+ } else if (!pathnameFilter || pathnameFilter(absolutePathname)) {
+ pathnames.push(coerce(absolutePathname));
+ }
+ }
+ }
+ }
+ // Sort the pathnames in place if requested.
+ if (sortPathnames) {
+ pathnames.sort();
+ }
+ return pathnames;
+}
+
+//# sourceMappingURL=recursive-readdir.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/recursive-readdir.js.map b/e-commerce/node_modules/next/dist/esm/lib/recursive-readdir.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2473220501caa80d98c2bc92478781d8e2d56642
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/recursive-readdir.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/recursive-readdir.ts"],"sourcesContent":["import fs from 'fs/promises'\nimport path from 'path'\n\ntype Filter = (pathname: string) => boolean\n\ntype Result = {\n directories: string[]\n pathnames: string[]\n links: string[]\n}\n\nexport type RecursiveReadDirOptions = {\n /**\n * Filter to ignore files with absolute pathnames, false to ignore.\n */\n pathnameFilter?: Filter\n\n /**\n * Filter to ignore files and directories with absolute pathnames, false to\n * ignore.\n */\n ignoreFilter?: Filter\n\n /**\n * Filter to ignore files and directories with the pathname part, false to\n * ignore.\n */\n ignorePartFilter?: Filter\n\n /**\n * Whether to sort the results, true by default.\n */\n sortPathnames?: boolean\n\n /**\n * Whether to return relative pathnames, true by default.\n */\n relativePathnames?: boolean\n}\n\n/**\n * Recursively reads a directory and returns the list of pathnames.\n *\n * @param rootDirectory the directory to read\n * @param options options to control the behavior of the recursive read\n * @returns the list of pathnames\n */\nexport async function recursiveReadDir(\n rootDirectory: string,\n options: RecursiveReadDirOptions = {}\n): Promise {\n // Grab our options.\n const {\n pathnameFilter,\n ignoreFilter,\n ignorePartFilter,\n sortPathnames = true,\n relativePathnames = true,\n } = options\n\n // The list of pathnames to return.\n const pathnames: string[] = []\n\n /**\n * Coerces the pathname to be relative if requested.\n */\n const coerce = relativePathnames\n ? (pathname: string) => pathname.replace(rootDirectory, '')\n : (pathname: string) => pathname\n\n // The queue of directories to scan.\n let directories: string[] = [rootDirectory]\n\n while (directories.length > 0) {\n // Load all the files in each directory at the same time.\n const results = await Promise.all(\n directories.map(async (directory) => {\n const result: Result = { directories: [], pathnames: [], links: [] }\n\n try {\n const dir = await fs.readdir(directory, { withFileTypes: true })\n for (const file of dir) {\n // If enabled, ignore the file if it matches the ignore filter.\n if (ignorePartFilter && ignorePartFilter(file.name)) {\n continue\n }\n\n // Handle each file.\n const absolutePathname = path.join(directory, file.name)\n\n // If enabled, ignore the file if it matches the ignore filter.\n if (ignoreFilter && ignoreFilter(absolutePathname)) {\n continue\n }\n\n // If the file is a directory, then add it to the list of directories,\n // they'll be scanned on a later pass.\n if (file.isDirectory()) {\n result.directories.push(absolutePathname)\n } else if (file.isSymbolicLink()) {\n result.links.push(absolutePathname)\n } else if (!pathnameFilter || pathnameFilter(absolutePathname)) {\n result.pathnames.push(coerce(absolutePathname))\n }\n }\n } catch (err: any) {\n // This can only happen when the underlying directory was removed. If\n // anything other than this error occurs, re-throw it.\n // if (err.code !== 'ENOENT') throw err\n if (err.code !== 'ENOENT' || directory === rootDirectory) throw err\n\n // The error occurred, so abandon reading this directory.\n return null\n }\n\n return result\n })\n )\n\n // Empty the directories, we'll fill it later if some of the files are\n // directories.\n directories = []\n\n // Keep track of any symbolic links we find, we'll resolve them later.\n const links = []\n\n // For each result of directory scans...\n for (const result of results) {\n // If the directory was removed, then skip it.\n if (!result) continue\n\n // Add any directories to the list of directories to scan.\n directories.push(...result.directories)\n\n // Add any symbolic links to the list of symbolic links to resolve.\n links.push(...result.links)\n\n // Add any file pathnames to the list of pathnames.\n pathnames.push(...result.pathnames)\n }\n\n // Resolve all the symbolic links we found if any.\n if (links.length > 0) {\n const resolved = await Promise.all(\n links.map(async (absolutePathname) => {\n try {\n return await fs.stat(absolutePathname)\n } catch (err: any) {\n // This can only happen when the underlying link was removed. If\n // anything other than this error occurs, re-throw it.\n if (err.code !== 'ENOENT') throw err\n\n // The error occurred, so abandon reading this directory.\n return null\n }\n })\n )\n\n for (let i = 0; i < links.length; i++) {\n const stats = resolved[i]\n\n // If the link was removed, then skip it.\n if (!stats) continue\n\n // We would have already ignored the file if it matched the ignore\n // filter, so we don't need to check it again.\n const absolutePathname = links[i]\n\n if (stats.isDirectory()) {\n directories.push(absolutePathname)\n } else if (!pathnameFilter || pathnameFilter(absolutePathname)) {\n pathnames.push(coerce(absolutePathname))\n }\n }\n }\n }\n\n // Sort the pathnames in place if requested.\n if (sortPathnames) {\n pathnames.sort()\n }\n\n return pathnames\n}\n"],"names":["fs","path","recursiveReadDir","rootDirectory","options","pathnameFilter","ignoreFilter","ignorePartFilter","sortPathnames","relativePathnames","pathnames","coerce","pathname","replace","directories","length","results","Promise","all","map","directory","result","links","dir","readdir","withFileTypes","file","name","absolutePathname","join","isDirectory","push","isSymbolicLink","err","code","resolved","stat","i","stats","sort"],"mappings":"AAAA,OAAOA,QAAQ,cAAa;AAC5B,OAAOC,UAAU,OAAM;AAuCvB;;;;;;CAMC,GACD,OAAO,eAAeC,iBACpBC,aAAqB,EACrBC,UAAmC,CAAC,CAAC;IAErC,oBAAoB;IACpB,MAAM,EACJC,cAAc,EACdC,YAAY,EACZC,gBAAgB,EAChBC,gBAAgB,IAAI,EACpBC,oBAAoB,IAAI,EACzB,GAAGL;IAEJ,mCAAmC;IACnC,MAAMM,YAAsB,EAAE;IAE9B;;GAEC,GACD,MAAMC,SAASF,oBACX,CAACG,WAAqBA,SAASC,OAAO,CAACV,eAAe,MACtD,CAACS,WAAqBA;IAE1B,oCAAoC;IACpC,IAAIE,cAAwB;QAACX;KAAc;IAE3C,MAAOW,YAAYC,MAAM,GAAG,EAAG;QAC7B,yDAAyD;QACzD,MAAMC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V,OAAOP,WAAW;YAEtC,mEAAmE;YACnEQ,MAAMS,IAAI,IAAIV,OAAOC,KAAK;YAE1B,mDAAmD;YACnDZ,UAAUqB,IAAI,IAAIV,OAAOX,SAAS;QACpC;QAEA,kDAAkD;QAClD,IAAIY,MAAMP,MAAM,GAAG,GAAG;YACpB,MAAMoB,WAAW,MAAMlB,QAAQC,GAAG,CAChCI,MAAMH,GAAG,CAAC,OAAOS;gBACf,IAAI;oBACF,OAAO,MAAM5B,GAAGoC,IAAI,CAACR;gBACvB,EAAE,OAAOK,KAAU;oBACjB,gEAAgE;oBAChE,sDAAsD;oBACtD,IAAIA,IAAIC,IAAI,KAAK,UAAU,MAAMD;oBAEjC,yDAAyD;oBACzD,OAAO;gBACT;YACF;YAGF,IAAK,IAAII,IAAI,GAAGA,IAAIf,MAAMP,MAAM,EAAEsB,IAAK;gBACrC,MAAMC,QAAQH,QAAQ,CAACE,EAAE;gBAEzB,yCAAyC;gBACzC,IAAI,CAACC,OAAO;gBAEZ,kEAAkE;gBAClE,8CAA8C;gBAC9C,MAAMV,mBAAmBN,KAAK,CAACe,EAAE;gBAEjC,IAAIC,MAAMR,WAAW,IAAI;oBACvBhB,YAAYiB,IAAI,CAACH;gBACnB,OAAO,IAAI,CAACvB,kBAAkBA,eAAeuB,mBAAmB;oBAC9DlB,UAAUqB,IAAI,CAACpB,OAAOiB;gBACxB;YACF;QACF;IACF;IAEA,4CAA4C;IAC5C,IAAIpB,eAAe;QACjBE,UAAU6B,IAAI;IAChB;IAEA,OAAO7B;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/redirect-status.js b/e-commerce/node_modules/next/dist/esm/lib/redirect-status.js
new file mode 100644
index 0000000000000000000000000000000000000000..351a0e68c470403ec60a372d43a1a3fcef1a5f78
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/redirect-status.js
@@ -0,0 +1,23 @@
+import { RedirectStatusCode } from '../client/components/redirect-status-code';
+export const allowedStatusCodes = new Set([
+ 301,
+ 302,
+ 303,
+ 307,
+ 308
+]);
+export function getRedirectStatus(route) {
+ return route.statusCode || (route.permanent ? RedirectStatusCode.PermanentRedirect : RedirectStatusCode.TemporaryRedirect);
+}
+// for redirects we restrict matching /_next and for all routes
+// we add an optional trailing slash at the end for easier
+// configuring between trailingSlash: true/false
+export function modifyRouteRegex(regex, restrictedPaths) {
+ if (restrictedPaths) {
+ regex = regex.replace(/\^/, `^(?!${restrictedPaths.map((path)=>path.replace(/\//g, '\\/')).join('|')})`);
+ }
+ regex = regex.replace(/\$$/, '(?:\\/)?$');
+ return regex;
+}
+
+//# sourceMappingURL=redirect-status.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/redirect-status.js.map b/e-commerce/node_modules/next/dist/esm/lib/redirect-status.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..45916ef0b044551155f114dd7b76dadeae1e4589
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/redirect-status.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/redirect-status.ts"],"sourcesContent":["import { RedirectStatusCode } from '../client/components/redirect-status-code'\n\nexport const allowedStatusCodes = new Set([301, 302, 303, 307, 308])\n\nexport function getRedirectStatus(route: {\n statusCode?: number\n permanent?: boolean\n}): number {\n return (\n route.statusCode ||\n (route.permanent\n ? RedirectStatusCode.PermanentRedirect\n : RedirectStatusCode.TemporaryRedirect)\n )\n}\n\n// for redirects we restrict matching /_next and for all routes\n// we add an optional trailing slash at the end for easier\n// configuring between trailingSlash: true/false\nexport function modifyRouteRegex(regex: string, restrictedPaths?: string[]) {\n if (restrictedPaths) {\n regex = regex.replace(\n /\\^/,\n `^(?!${restrictedPaths\n .map((path) => path.replace(/\\//g, '\\\\/'))\n .join('|')})`\n )\n }\n regex = regex.replace(/\\$$/, '(?:\\\\/)?$')\n return regex\n}\n"],"names":["RedirectStatusCode","allowedStatusCodes","Set","getRedirectStatus","route","statusCode","permanent","PermanentRedirect","TemporaryRedirect","modifyRouteRegex","regex","restrictedPaths","replace","map","path","join"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,4CAA2C;AAE9E,OAAO,MAAMC,qBAAqB,IAAIC,IAAI;IAAC;IAAK;IAAK;IAAK;IAAK;CAAI,EAAC;AAEpE,OAAO,SAASC,kBAAkBC,KAGjC;IACC,OACEA,MAAMC,UAAU,IACfD,CAAAA,MAAME,SAAS,GACZN,mBAAmBO,iBAAiB,GACpCP,mBAAmBQ,iBAAiB,AAAD;AAE3C;AAEA,+DAA+D;AAC/D,0DAA0D;AAC1D,gDAAgD;AAChD,OAAO,SAASC,iBAAiBC,KAAa,EAAEC,eAA0B;IACxE,IAAIA,iBAAiB;QACnBD,QAAQA,MAAME,OAAO,CACnB,MACA,CAAC,IAAI,EAAED,gBACJE,GAAG,CAAC,CAACC,OAASA,KAAKF,OAAO,CAAC,OAAO,QAClCG,IAAI,CAAC,KAAK,CAAC,CAAC;IAEnB;IACAL,QAAQA,MAAME,OAAO,CAAC,OAAO;IAC7B,OAAOF;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/require-instrumentation-client.js b/e-commerce/node_modules/next/dist/esm/lib/require-instrumentation-client.js
new file mode 100644
index 0000000000000000000000000000000000000000..8b40cb32e7dacb5916b1f4ed7d0e073c5a525317
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/require-instrumentation-client.js
@@ -0,0 +1,31 @@
+/**
+ * This module imports the configured client instrumentation modules.
+ *
+ * The `private-next-instrumentation-client` module is automatically aliased to
+ * either the user's instrumentation module or a generated module array.
+ */ if (process.env.NODE_ENV === 'development') {
+ const measureName = 'Client Instrumentation Hook';
+ const startTime = performance.now();
+ // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.
+ const instrumentationClient = require('private-next-instrumentation-client');
+ module.exports = Array.isArray(instrumentationClient) ? instrumentationClient : [
+ instrumentationClient
+ ];
+ const endTime = performance.now();
+ const duration = endTime - startTime;
+ // Using 16ms threshold as it represents one frame (1000ms/60fps)
+ // This helps identify if the instrumentation hook initialization
+ // could potentially cause frame drops during development.
+ const THRESHOLD = 16;
+ if (duration > THRESHOLD) {
+ console.log(`[${measureName}] Slow execution detected: ${duration.toFixed(0)}ms (Note: Code download overhead is not included in this measurement)`);
+ }
+} else {
+ // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.
+ const instrumentationClient = require('private-next-instrumentation-client');
+ module.exports = Array.isArray(instrumentationClient) ? instrumentationClient : [
+ instrumentationClient
+ ];
+}
+
+//# sourceMappingURL=require-instrumentation-client.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/require-instrumentation-client.js.map b/e-commerce/node_modules/next/dist/esm/lib/require-instrumentation-client.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..3d641c3a93f3c5337849ff79f7d4de433e9ed589
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/require-instrumentation-client.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/require-instrumentation-client.ts"],"sourcesContent":["/**\n * This module imports the configured client instrumentation modules.\n *\n * The `private-next-instrumentation-client` module is automatically aliased to\n * either the user's instrumentation module or a generated module array.\n */\nif (process.env.NODE_ENV === 'development') {\n const measureName = 'Client Instrumentation Hook'\n const startTime = performance.now()\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n const instrumentationClient = require('private-next-instrumentation-client')\n module.exports = Array.isArray(instrumentationClient)\n ? instrumentationClient\n : [instrumentationClient]\n const endTime = performance.now()\n const duration = endTime - startTime\n\n // Using 16ms threshold as it represents one frame (1000ms/60fps)\n // This helps identify if the instrumentation hook initialization\n // could potentially cause frame drops during development.\n const THRESHOLD = 16\n if (duration > THRESHOLD) {\n console.log(\n `[${measureName}] Slow execution detected: ${duration.toFixed(0)}ms (Note: Code download overhead is not included in this measurement)`\n )\n }\n} else {\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n const instrumentationClient = require('private-next-instrumentation-client')\n module.exports = Array.isArray(instrumentationClient)\n ? instrumentationClient\n : [instrumentationClient]\n}\n"],"names":["process","env","NODE_ENV","measureName","startTime","performance","now","instrumentationClient","require","module","exports","Array","isArray","endTime","duration","THRESHOLD","console","log","toFixed"],"mappings":"AAAA;;;;;CAKC,GACD,IAAIA,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;IAC1C,MAAMC,cAAc;IACpB,MAAMC,YAAYC,YAAYC,GAAG;IACjC,+EAA+E;IAC/E,MAAMC,wBAAwBC,QAAQ;IACtCC,OAAOC,OAAO,GAAGC,MAAMC,OAAO,CAACL,yBAC3BA,wBACA;QAACA;KAAsB;IAC3B,MAAMM,UAAUR,YAAYC,GAAG;IAC/B,MAAMQ,WAAWD,UAAUT;IAE3B,iEAAiE;IACjE,iEAAiE;IACjE,0DAA0D;IAC1D,MAAMW,YAAY;IAClB,IAAID,WAAWC,WAAW;QACxBC,QAAQC,GAAG,CACT,CAAC,CAAC,EAAEd,YAAY,2BAA2B,EAAEW,SAASI,OAAO,CAAC,GAAG,qEAAqE,CAAC;IAE3I;AACF,OAAO;IACL,+EAA+E;IAC/E,MAAMX,wBAAwBC,QAAQ;IACtCC,OAAOC,OAAO,GAAGC,MAAMC,OAAO,CAACL,yBAC3BA,wBACA;QAACA;KAAsB;AAC7B","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/resolve-build-paths.js b/e-commerce/node_modules/next/dist/esm/lib/resolve-build-paths.js
new file mode 100644
index 0000000000000000000000000000000000000000..7542e6c77bf88b3659a92a16bf0242a0429acdb9
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/resolve-build-paths.js
@@ -0,0 +1,124 @@
+import { promisify } from 'util';
+import globOriginal from 'next/dist/compiled/glob';
+import * as Log from '../build/output/log';
+import path from 'path';
+import fs from 'fs';
+import isError from './is-error';
+import { createValidFileMatcher } from '../server/lib/find-page-file';
+const glob = promisify(globOriginal);
+/**
+ * Escapes Next.js dynamic route bracket expressions so glob treats them as
+ * literal directory names rather than character classes.
+ *
+ * e.g., "app/blog/[slug]/** /page.tsx" → "app/blog/\[slug\]/** /page.tsx"
+ */ function escapeBrackets(pattern) {
+ // Match Next.js dynamic route patterns: [name], [...name], [[...name]]
+ return pattern.replace(/\[\[?\.\.\.[^\]]+\]?\]|\[[^\]]+\]/g, (match)=>match.replace(/\[/g, '\\[').replace(/\]/g, '\\]'));
+}
+/**
+ * Resolves glob patterns and explicit paths to actual file paths.
+ * Categorizes them into App Router and Pages Router paths.
+ *
+ * Supports negation patterns prefixed with "!" to exclude paths.
+ * e.g., "app/**,!app/[lang]/page.js" includes all App Router paths except
+ * app/[lang]/page.js
+ */ export async function resolveBuildPaths(patterns, projectDir, pageExtensions) {
+ const appPaths = new Set();
+ const pagePaths = new Set();
+ const validFileMatcher = createValidFileMatcher(pageExtensions, undefined);
+ // Detect whether the project keeps its routes under `src/` so we can accept
+ // patterns written with or without that prefix (e.g. both `app/foo/page.tsx`
+ // and `src/app/foo/page.tsx`).
+ const useSrcApp = fs.existsSync(path.join(projectDir, 'src', 'app'));
+ const useSrcPages = fs.existsSync(path.join(projectDir, 'src', 'pages'));
+ const includePatterns = [];
+ const excludePatterns = [];
+ for (const pattern of patterns){
+ const trimmed = pattern.trim();
+ if (!trimmed) continue;
+ if (trimmed.startsWith('!')) {
+ excludePatterns.push(escapeBrackets(addSrcPrefixIfNeeded(trimmed.slice(1), useSrcApp, useSrcPages)));
+ } else {
+ includePatterns.push(escapeBrackets(addSrcPrefixIfNeeded(trimmed, useSrcApp, useSrcPages)));
+ }
+ }
+ // Default to matching all files when only negation patterns are provided.
+ if (includePatterns.length === 0 && excludePatterns.length > 0) {
+ includePatterns.push('**');
+ }
+ // Combine patterns using brace expansion: {pattern1,pattern2}
+ const combinedPattern = includePatterns.length === 1 ? includePatterns[0] : `{${includePatterns.join(',')}}`;
+ try {
+ const matches = await glob(combinedPattern, {
+ cwd: projectDir,
+ ignore: excludePatterns
+ });
+ if (matches.length === 0) {
+ Log.warn(`Pattern "${patterns.join(',')}" did not match any files`);
+ }
+ for (const file of matches){
+ if (!fs.statSync(path.join(projectDir, file)).isDirectory()) {
+ categorizeAndAddPath(file, appPaths, pagePaths, validFileMatcher);
+ }
+ }
+ } catch (error) {
+ throw new Error(`Failed to resolve pattern "${patterns.join(',')}": ${isError(error) ? error.message : String(error)}`);
+ }
+ return {
+ appPaths: Array.from(appPaths).sort(),
+ pagePaths: Array.from(pagePaths).sort()
+ };
+}
+/**
+ * When the project keeps its `app/` or `pages/` directory under `src/`, prepend
+ * `src/` to bare patterns so the glob actually matches files on disk. Patterns
+ * that already include the `src/` prefix are returned unchanged.
+ */ function addSrcPrefixIfNeeded(pattern, useSrcApp, useSrcPages) {
+ const normalized = pattern.replace(/\\/g, '/');
+ if (useSrcApp && /^app\//.test(normalized)) {
+ return 'src/' + normalized;
+ }
+ if (useSrcPages && /^pages\//.test(normalized)) {
+ return 'src/' + normalized;
+ }
+ return pattern;
+}
+/**
+ * Categorizes a file path to either app or pages router based on its prefix.
+ * For app router, only route-defining files are included.
+ *
+ * Accepts both top-level (`app/...`, `pages/...`) and src-prefixed
+ * (`src/app/...`, `src/pages/...`) project structures.
+ *
+ * Examples:
+ * - "app/page.tsx" → appPaths.add("/page.tsx")
+ * - "src/app/page.tsx" → appPaths.add("/page.tsx")
+ * - "app/layout.tsx" → skipped (not a route file)
+ * - "pages/index.tsx" → pagePaths.add("/index.tsx")
+ */ function categorizeAndAddPath(filePath, appPaths, pagePaths, validFileMatcher) {
+ let normalized = filePath.replace(/\\/g, '/');
+ if (normalized.startsWith('src/')) {
+ normalized = normalized.slice(4);
+ }
+ if (normalized.startsWith('app/')) {
+ const appRelativePath = '/' + normalized.slice(4);
+ if (validFileMatcher.isAppRouterPage(appRelativePath)) {
+ appPaths.add(appRelativePath);
+ }
+ } else if (normalized.startsWith('pages/')) {
+ pagePaths.add('/' + normalized.slice(6));
+ }
+}
+/**
+ * Parse build paths from comma-separated format
+ * Supports:
+ * - Comma-separated values: "app/page.tsx,app/about/page.tsx"
+ *
+ * @param input - String input to parse
+ * @returns Array of path patterns
+ */ export function parseBuildPathsInput(input) {
+ // Comma-separated values
+ return input.split(',').map((p)=>p.trim()).filter((p)=>p.length > 0);
+}
+
+//# sourceMappingURL=resolve-build-paths.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/resolve-build-paths.js.map b/e-commerce/node_modules/next/dist/esm/lib/resolve-build-paths.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..78c9d273cabf85cce8895c9463b2ded5a7c9a3e6
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/resolve-build-paths.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/resolve-build-paths.ts"],"sourcesContent":["import { promisify } from 'util'\nimport globOriginal from 'next/dist/compiled/glob'\nimport * as Log from '../build/output/log'\nimport path from 'path'\nimport fs from 'fs'\nimport isError from './is-error'\nimport { createValidFileMatcher } from '../server/lib/find-page-file'\nimport type { PageExtensions } from '../build/page-extensions-type'\n\nconst glob = promisify(globOriginal)\n\ninterface ResolvedBuildPaths {\n appPaths: string[]\n pagePaths: string[]\n}\n\n/**\n * Escapes Next.js dynamic route bracket expressions so glob treats them as\n * literal directory names rather than character classes.\n *\n * e.g., \"app/blog/[slug]/** /page.tsx\" → \"app/blog/\\[slug\\]/** /page.tsx\"\n */\nfunction escapeBrackets(pattern: string): string {\n // Match Next.js dynamic route patterns: [name], [...name], [[...name]]\n return pattern.replace(/\\[\\[?\\.\\.\\.[^\\]]+\\]?\\]|\\[[^\\]]+\\]/g, (match) =>\n match.replace(/\\[/g, '\\\\[').replace(/\\]/g, '\\\\]')\n )\n}\n\n/**\n * Resolves glob patterns and explicit paths to actual file paths.\n * Categorizes them into App Router and Pages Router paths.\n *\n * Supports negation patterns prefixed with \"!\" to exclude paths.\n * e.g., \"app/**,!app/[lang]/page.js\" includes all App Router paths except\n * app/[lang]/page.js\n */\nexport async function resolveBuildPaths(\n patterns: string[],\n projectDir: string,\n pageExtensions: PageExtensions\n): Promise {\n const appPaths: Set = new Set()\n const pagePaths: Set = new Set()\n const validFileMatcher = createValidFileMatcher(pageExtensions, undefined)\n\n // Detect whether the project keeps its routes under `src/` so we can accept\n // patterns written with or without that prefix (e.g. both `app/foo/page.tsx`\n // and `src/app/foo/page.tsx`).\n const useSrcApp = fs.existsSync(path.join(projectDir, 'src', 'app'))\n const useSrcPages = fs.existsSync(path.join(projectDir, 'src', 'pages'))\n\n const includePatterns: string[] = []\n const excludePatterns: string[] = []\n\n for (const pattern of patterns) {\n const trimmed = pattern.trim()\n if (!trimmed) continue\n\n if (trimmed.startsWith('!')) {\n excludePatterns.push(\n escapeBrackets(\n addSrcPrefixIfNeeded(trimmed.slice(1), useSrcApp, useSrcPages)\n )\n )\n } else {\n includePatterns.push(\n escapeBrackets(addSrcPrefixIfNeeded(trimmed, useSrcApp, useSrcPages))\n )\n }\n }\n\n // Default to matching all files when only negation patterns are provided.\n if (includePatterns.length === 0 && excludePatterns.length > 0) {\n includePatterns.push('**')\n }\n\n // Combine patterns using brace expansion: {pattern1,pattern2}\n const combinedPattern =\n includePatterns.length === 1\n ? includePatterns[0]\n : `{${includePatterns.join(',')}}`\n\n try {\n const matches = (await glob(combinedPattern, {\n cwd: projectDir,\n ignore: excludePatterns,\n })) as string[]\n\n if (matches.length === 0) {\n Log.warn(`Pattern \"${patterns.join(',')}\" did not match any files`)\n }\n\n for (const file of matches) {\n if (!fs.statSync(path.join(projectDir, file)).isDirectory()) {\n categorizeAndAddPath(file, appPaths, pagePaths, validFileMatcher)\n }\n }\n } catch (error) {\n throw new Error(\n `Failed to resolve pattern \"${patterns.join(',')}\": ${\n isError(error) ? error.message : String(error)\n }`\n )\n }\n\n return {\n appPaths: Array.from(appPaths).sort(),\n pagePaths: Array.from(pagePaths).sort(),\n }\n}\n\n/**\n * When the project keeps its `app/` or `pages/` directory under `src/`, prepend\n * `src/` to bare patterns so the glob actually matches files on disk. Patterns\n * that already include the `src/` prefix are returned unchanged.\n */\nfunction addSrcPrefixIfNeeded(\n pattern: string,\n useSrcApp: boolean,\n useSrcPages: boolean\n): string {\n const normalized = pattern.replace(/\\\\/g, '/')\n if (useSrcApp && /^app\\//.test(normalized)) {\n return 'src/' + normalized\n }\n if (useSrcPages && /^pages\\//.test(normalized)) {\n return 'src/' + normalized\n }\n return pattern\n}\n\n/**\n * Categorizes a file path to either app or pages router based on its prefix.\n * For app router, only route-defining files are included.\n *\n * Accepts both top-level (`app/...`, `pages/...`) and src-prefixed\n * (`src/app/...`, `src/pages/...`) project structures.\n *\n * Examples:\n * - \"app/page.tsx\" → appPaths.add(\"/page.tsx\")\n * - \"src/app/page.tsx\" → appPaths.add(\"/page.tsx\")\n * - \"app/layout.tsx\" → skipped (not a route file)\n * - \"pages/index.tsx\" → pagePaths.add(\"/index.tsx\")\n */\nfunction categorizeAndAddPath(\n filePath: string,\n appPaths: Set,\n pagePaths: Set,\n validFileMatcher: ReturnType\n): void {\n let normalized = filePath.replace(/\\\\/g, '/')\n\n if (normalized.startsWith('src/')) {\n normalized = normalized.slice(4)\n }\n\n if (normalized.startsWith('app/')) {\n const appRelativePath = '/' + normalized.slice(4)\n if (validFileMatcher.isAppRouterPage(appRelativePath)) {\n appPaths.add(appRelativePath)\n }\n } else if (normalized.startsWith('pages/')) {\n pagePaths.add('/' + normalized.slice(6))\n }\n}\n\n/**\n * Parse build paths from comma-separated format\n * Supports:\n * - Comma-separated values: \"app/page.tsx,app/about/page.tsx\"\n *\n * @param input - String input to parse\n * @returns Array of path patterns\n */\nexport function parseBuildPathsInput(input: string): string[] {\n // Comma-separated values\n return input\n .split(',')\n .map((p) => p.trim())\n .filter((p) => p.length > 0)\n}\n"],"names":["promisify","globOriginal","Log","path","fs","isError","createValidFileMatcher","glob","escapeBrackets","pattern","replace","match","resolveBuildPaths","patterns","projectDir","pageExtensions","appPaths","Set","pagePaths","validFileMatcher","undefined","useSrcApp","existsSync","join","useSrcPages","includePatterns","excludePatterns","trimmed","trim","startsWith","push","addSrcPrefixIfNeeded","slice","length","combinedPattern","matches","cwd","ignore","warn","file","statSync","isDirectory","categorizeAndAddPath","error","Error","message","String","Array","from","sort","normalized","test","filePath","appRelativePath","isAppRouterPage","add","parseBuildPathsInput","input","split","map","p","filter"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAM;AAChC,OAAOC,kBAAkB,0BAAyB;AAClD,YAAYC,SAAS,sBAAqB;AAC1C,OAAOC,UAAU,OAAM;AACvB,OAAOC,QAAQ,KAAI;AACnB,OAAOC,aAAa,aAAY;AAChC,SAASC,sBAAsB,QAAQ,+BAA8B;AAGrE,MAAMC,OAAOP,UAAUC;AAOvB;;;;;CAKC,GACD,SAASO,eAAeC,OAAe;IACrC,uEAAuE;IACvE,OAAOA,QAAQC,OAAO,CAAC,sCAAsC,CAACC,QAC5DA,MAAMD,OAAO,CAAC,OAAO,OAAOA,OAAO,CAAC,OAAO;AAE/C;AAEA;;;;;;;CAOC,GACD,OAAO,eAAeE,kBACpBC,QAAkB,EAClBC,UAAkB,EAClBC,cAA8B;IAE9B,MAAMC,WAAwB,IAAIC;IAClC,MAAMC,YAAyB,IAAID;IACnC,MAAME,mBAAmBb,uBAAuBS,gBAAgBK;IAEhE,4EAA4E;IAC5E,6EAA6E;IAC7E,+BAA+B;IAC/B,MAAMC,YAAYjB,GAAGkB,UAAU,CAACnB,KAAKoB,IAAI,CAACT,YAAY,OAAO;IAC7D,MAAMU,cAAcpB,GAAGkB,UAAU,CAACnB,KAAKoB,IAAI,CAACT,YAAY,OAAO;IAE/D,MAAMW,kBAA4B,EAAE;IACpC,MAAMC,kBAA4B,EAAE;IAEpC,KAAK,MAAMjB,WAAWI,SAAU;QAC9B,MAAMc,UAAUlB,QAAQmB,IAAI;QAC5B,IAAI,CAACD,SAAS;QAEd,IAAIA,QAAQE,UAAU,CAAC,MAAM;YAC3BH,gBA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CAAC,OAAO;IAC1C,IAAIW,aAAa,SAAS8B,IAAI,CAACD,aAAa;QAC1C,OAAO,SAASA;IAClB;IACA,IAAI1B,eAAe,WAAW2B,IAAI,CAACD,aAAa;QAC9C,OAAO,SAASA;IAClB;IACA,OAAOzC;AACT;AAEA;;;;;;;;;;;;CAYC,GACD,SAASiC,qBACPU,QAAgB,EAChBpC,QAAqB,EACrBE,SAAsB,EACtBC,gBAA2D;IAE3D,IAAI+B,aAAaE,SAAS1C,OAAO,CAAC,OAAO;IAEzC,IAAIwC,WAAWrB,UAAU,CAAC,SAAS;QACjCqB,aAAaA,WAAWlB,KAAK,CAAC;IAChC;IAEA,IAAIkB,WAAWrB,UAAU,CAAC,SAAS;QACjC,MAAMwB,kBAAkB,MAAMH,WAAWlB,KAAK,CAAC;QAC/C,IAAIb,iBAAiBmC,eAAe,CAACD,kBAAkB;YACrDrC,SAASuC,GAAG,CAACF;QACf;IACF,OAAO,IAAIH,WAAWrB,UAAU,CAAC,WAAW;QAC1CX,UAAUqC,GAAG,CAAC,MAAML,WAAWlB,KAAK,CAAC;IACvC;AACF;AAEA;;;;;;;CAOC,GACD,OAAO,SAASwB,qBAAqBC,KAAa;IAChD,yBAAyB;IACzB,OAAOA,MACJC,KAAK,CAAC,KACNC,GAAG,CAAC,CAACC,IAAMA,EAAEhC,IAAI,IACjBiC,MAAM,CAAC,CAACD,IAAMA,EAAE3B,MAAM,GAAG;AAC9B","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/resolve-from.js b/e-commerce/node_modules/next/dist/esm/lib/resolve-from.js
new file mode 100644
index 0000000000000000000000000000000000000000..74d0ff3608c12320553ecc500ece1b33ae9b8fd4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/resolve-from.js
@@ -0,0 +1,42 @@
+// source: https://github.com/sindresorhus/resolve-from
+import path from 'path';
+import isError from './is-error';
+import { realpathSync } from './realpath';
+const Module = require('module');
+export const resolveFrom = (fromDirectory, moduleId, silent)=>{
+ if (typeof fromDirectory !== 'string') {
+ throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``);
+ }
+ if (typeof moduleId !== 'string') {
+ throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``);
+ }
+ try {
+ fromDirectory = realpathSync(fromDirectory);
+ } catch (error) {
+ if (isError(error) && error.code === 'ENOENT') {
+ fromDirectory = path.resolve(fromDirectory);
+ } else if (silent) {
+ return;
+ } else {
+ throw error;
+ }
+ }
+ const fromFile = path.join(fromDirectory, 'noop.js');
+ const resolveFileName = ()=>// @ts-expect-error
+ Module._resolveFilename(moduleId, {
+ id: fromFile,
+ filename: fromFile,
+ paths: // @ts-expect-error
+ Module._nodeModulePaths(fromDirectory)
+ });
+ if (silent) {
+ try {
+ return resolveFileName();
+ } catch (error) {
+ return;
+ }
+ }
+ return resolveFileName();
+};
+
+//# sourceMappingURL=resolve-from.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/resolve-from.js.map b/e-commerce/node_modules/next/dist/esm/lib/resolve-from.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ca87b4cb6459f3fb08b65b460b67d568f2fd13d4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/resolve-from.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/resolve-from.ts"],"sourcesContent":["// source: https://github.com/sindresorhus/resolve-from\nimport path from 'path'\nimport isError from './is-error'\nimport { realpathSync } from './realpath'\n\nconst Module = require('module') as typeof import('module')\n\nexport const resolveFrom = (\n fromDirectory: string,\n moduleId: string,\n silent?: boolean\n) => {\n if (typeof fromDirectory !== 'string') {\n throw new TypeError(\n `Expected \\`fromDir\\` to be of type \\`string\\`, got \\`${typeof fromDirectory}\\``\n )\n }\n\n if (typeof moduleId !== 'string') {\n throw new TypeError(\n `Expected \\`moduleId\\` to be of type \\`string\\`, got \\`${typeof moduleId}\\``\n )\n }\n\n try {\n fromDirectory = realpathSync(fromDirectory)\n } catch (error: unknown) {\n if (isError(error) && error.code === 'ENOENT') {\n fromDirectory = path.resolve(fromDirectory)\n } else if (silent) {\n return\n } else {\n throw error\n }\n }\n\n const fromFile = path.join(fromDirectory, 'noop.js')\n\n const resolveFileName = () =>\n // @ts-expect-error\n Module._resolveFilename(moduleId, {\n id: fromFile,\n filename: fromFile,\n paths:\n // @ts-expect-error\n Module._nodeModulePaths(fromDirectory),\n })\n\n if (silent) {\n try {\n return resolveFileName()\n } catch (error) {\n return\n }\n }\n\n return resolveFileName()\n}\n"],"names":["path","isError","realpathSync","Module","require","resolveFrom","fromDirectory","moduleId","silent","TypeError","error","code","resolve","fromFile","join","resolveFileName","_resolveFilename","id","filename","paths","_nodeModulePaths"],"mappings":"AAAA,uDAAuD;AACvD,OAAOA,UAAU,OAAM;AACvB,OAAOC,aAAa,aAAY;AAChC,SAASC,YAAY,QAAQ,aAAY;AAEzC,MAAMC,SAASC,QAAQ;AAEvB,OAAO,MAAMC,cAAc,CACzBC,eACAC,UACAC;IAEA,IAAI,OAAOF,kBAAkB,UAAU;QACrC,MAAM,IAAIG,UACR,CAAC,qDAAqD,EAAE,OAAOH,cAAc,EAAE,CAAC;IAEpF;IAEA,IAAI,OAAOC,aAAa,UAAU;QAChC,MAAM,IAAIE,UACR,CAAC,sDAAsD,EAAE,OAAOF,SAAS,EAAE,CAAC;IAEhF;IAEA,IAAI;QACFD,gBAAgBJ,aAAaI;IAC/B,EAAE,OAAOI,OAAgB;QACvB,IAAIT,QAAQS,UAAUA,MAAMC,IAAI,KAAK,UAAU;YAC7CL,gBAAgBN,KAAKY,OAAO,CAACN;QAC/B,OAAO,IAAIE,QAAQ;YACjB;QACF,OAAO;YACL,MAAME;QACR;IACF;IAEA,MAAMG,WAAWb,KAAKc,IAAI,CAACR,eAAe;IAE1C,MAAMS,kBAAkB,IACtB,mBAAmB;QACnBZ,OAAOa,gBAAgB,CAACT,UAAU;YAChCU,IAAIJ;YACJK,UAAUL;YACVM,OACE,mBAAmB;YACnBhB,OAAOiB,gBAAgB,CAACd;QAC5B;IAEF,IAAIE,QAAQ;QACV,IAAI;YACF,OAAOO;QACT,EAAE,OAAOL,OAAO;YACd;QACF;IACF;IAEA,OAAOK;AACT,EAAC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/route-pattern-normalizer.js b/e-commerce/node_modules/next/dist/esm/lib/route-pattern-normalizer.js
new file mode 100644
index 0000000000000000000000000000000000000000..a4155fdc6da2f7969cc1650a5729093834acb2fc
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/route-pattern-normalizer.js
@@ -0,0 +1,105 @@
+/**
+ * Route pattern normalization utilities for path-to-regexp compatibility.
+ *
+ * path-to-regexp 6.3.0+ introduced stricter validation that rejects certain
+ * patterns commonly used in Next.js interception routes. This module provides
+ * normalization functions to make Next.js route patterns compatible with the
+ * updated library while preserving all functionality.
+ */ /**
+ * Internal separator used to normalize adjacent parameter patterns.
+ * This unique marker is inserted between adjacent parameters and stripped out
+ * during parameter extraction to avoid conflicts with real URL content.
+ */ export const PARAM_SEPARATOR = '_NEXTSEP_';
+/**
+ * Detects if a route pattern needs normalization for path-to-regexp compatibility.
+ */ export function hasAdjacentParameterIssues(route) {
+ if (typeof route !== 'string') return false;
+ // Check for interception route markers followed immediately by parameters
+ // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc.
+ // These patterns cause "Must have text between two parameters" errors
+ if (/\/\(\.{1,3}\):[^/\s]+/.test(route)) {
+ return true;
+ }
+ // Check for basic adjacent parameters without separators
+ // Pattern: :param1:param2 (but not :param* or other URL patterns)
+ if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {
+ return true;
+ }
+ return false;
+}
+/**
+ * Normalizes route patterns that have adjacent parameters without text between them.
+ * Inserts a unique separator that can be safely stripped out later.
+ */ export function normalizeAdjacentParameters(route) {
+ let normalized = route;
+ // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param
+ normalized = normalized.replace(/(\([^)]*\)):([^/\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);
+ // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2
+ normalized = normalized.replace(/:([^:/\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);
+ return normalized;
+}
+/**
+ * Normalizes tokens that have repeating modifiers (* or +) but empty prefix and suffix.
+ *
+ * path-to-regexp 6.3.0+ introduced validation that throws:
+ * "Can not repeat without prefix/suffix"
+ *
+ * This occurs when a token has modifier: '*' or '+' with both prefix: '' and suffix: ''
+ */ export function normalizeTokensForRegexp(tokens) {
+ return tokens.map((token)=>{
+ // Token union type: Token = string | TokenObject
+ // Literal path segments are strings, parameters/wildcards are objects
+ if (typeof token === 'object' && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)
+ 'modifier' in token && // Only repeating modifiers (* or +) cause the validation error
+ // Other modifiers like '?' (optional) are fine
+ (token.modifier === '*' || token.modifier === '+') && // Token objects can have different shapes depending on route pattern
+ 'prefix' in token && 'suffix' in token && // Both prefix and suffix must be empty strings
+ // This is what causes the validation error in path-to-regexp
+ token.prefix === '' && token.suffix === '') {
+ // Add minimal prefix to satisfy path-to-regexp validation
+ // We use '/' as it's the most common path delimiter and won't break route matching
+ // The prefix gets used in regex generation but doesn't affect parameter extraction
+ return {
+ ...token,
+ prefix: '/'
+ };
+ }
+ return token;
+ });
+}
+/**
+ * Strips normalization separators from compiled pathname.
+ * This removes separators that were inserted by normalizeAdjacentParameters
+ * to satisfy path-to-regexp validation.
+ *
+ * Only removes separators in the specific contexts where they were inserted:
+ * - After interception route markers: (.)_NEXTSEP_ -> (.)
+ *
+ * This targeted approach ensures we don't accidentally remove the separator
+ * from legitimate user content.
+ */ export function stripNormalizedSeparators(pathname) {
+ // Remove separator after interception route markers
+ // Pattern: (.)_NEXTSEP_ -> (.), (..)_NEXTSEP_ -> (..), etc.
+ // The separator appears after the closing paren of interception markers
+ return pathname.replace(new RegExp(`\\)${PARAM_SEPARATOR}`, 'g'), ')');
+}
+/**
+ * Strips normalization separators from extracted route parameters.
+ * Used by both server and client code to clean up parameters after route matching.
+ */ export function stripParameterSeparators(params) {
+ const cleaned = {};
+ for (const [key, value] of Object.entries(params)){
+ if (typeof value === 'string') {
+ // Remove the separator if it appears at the start of parameter values
+ cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), '');
+ } else if (Array.isArray(value)) {
+ // Handle array parameters (from repeated route segments)
+ cleaned[key] = value.map((item)=>typeof item === 'string' ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), '') : item);
+ } else {
+ cleaned[key] = value;
+ }
+ }
+ return cleaned;
+}
+
+//# sourceMappingURL=route-pattern-normalizer.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/route-pattern-normalizer.js.map b/e-commerce/node_modules/next/dist/esm/lib/route-pattern-normalizer.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..d03b9722a08175c1a45688df03d3c0c5ea0e656e
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/route-pattern-normalizer.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/route-pattern-normalizer.ts"],"sourcesContent":["import type { Token } from 'next/dist/compiled/path-to-regexp'\n\n/**\n * Route pattern normalization utilities for path-to-regexp compatibility.\n *\n * path-to-regexp 6.3.0+ introduced stricter validation that rejects certain\n * patterns commonly used in Next.js interception routes. This module provides\n * normalization functions to make Next.js route patterns compatible with the\n * updated library while preserving all functionality.\n */\n\n/**\n * Internal separator used to normalize adjacent parameter patterns.\n * This unique marker is inserted between adjacent parameters and stripped out\n * during parameter extraction to avoid conflicts with real URL content.\n */\nexport const PARAM_SEPARATOR = '_NEXTSEP_'\n\n/**\n * Detects if a route pattern needs normalization for path-to-regexp compatibility.\n */\nexport function hasAdjacentParameterIssues(route: string): boolean {\n if (typeof route !== 'string') return false\n\n // Check for interception route markers followed immediately by parameters\n // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc.\n // These patterns cause \"Must have text between two parameters\" errors\n if (/\\/\\(\\.{1,3}\\):[^/\\s]+/.test(route)) {\n return true\n }\n\n // Check for basic adjacent parameters without separators\n // Pattern: :param1:param2 (but not :param* or other URL patterns)\n if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {\n return true\n }\n\n return false\n}\n\n/**\n * Normalizes route patterns that have adjacent parameters without text between them.\n * Inserts a unique separator that can be safely stripped out later.\n */\nexport function normalizeAdjacentParameters(route: string): string {\n let normalized = route\n\n // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param\n normalized = normalized.replace(\n /(\\([^)]*\\)):([^/\\s]+)/g,\n `$1${PARAM_SEPARATOR}:$2`\n )\n\n // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2\n normalized = normalized.replace(/:([^:/\\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`)\n\n return normalized\n}\n\n/**\n * Normalizes tokens that have repeating modifiers (* or +) but empty prefix and suffix.\n *\n * path-to-regexp 6.3.0+ introduced validation that throws:\n * \"Can not repeat without prefix/suffix\"\n *\n * This occurs when a token has modifier: '*' or '+' with both prefix: '' and suffix: ''\n */\nexport function normalizeTokensForRegexp(tokens: Token[]): Token[] {\n return tokens.map((token) => {\n // Token union type: Token = string | TokenObject\n // Literal path segments are strings, parameters/wildcards are objects\n if (\n typeof token === 'object' &&\n token !== null &&\n // Not all token objects have 'modifier' property (e.g., simple text tokens)\n 'modifier' in token &&\n // Only repeating modifiers (* or +) cause the validation error\n // Other modifiers like '?' (optional) are fine\n (token.modifier === '*' || token.modifier === '+') &&\n // Token objects can have different shapes depending on route pattern\n 'prefix' in token &&\n 'suffix' in token &&\n // Both prefix and suffix must be empty strings\n // This is what causes the validation error in path-to-regexp\n token.prefix === '' &&\n token.suffix === ''\n ) {\n // Add minimal prefix to satisfy path-to-regexp validation\n // We use '/' as it's the most common path delimiter and won't break route matching\n // The prefix gets used in regex generation but doesn't affect parameter extraction\n return {\n ...token,\n prefix: '/',\n }\n }\n return token\n })\n}\n\n/**\n * Strips normalization separators from compiled pathname.\n * This removes separators that were inserted by normalizeAdjacentParameters\n * to satisfy path-to-regexp validation.\n *\n * Only removes separators in the specific contexts where they were inserted:\n * - After interception route markers: (.)_NEXTSEP_ -> (.)\n *\n * This targeted approach ensures we don't accidentally remove the separator\n * from legitimate user content.\n */\nexport function stripNormalizedSeparators(pathname: string): string {\n // Remove separator after interception route markers\n // Pattern: (.)_NEXTSEP_ -> (.), (..)_NEXTSEP_ -> (..), etc.\n // The separator appears after the closing paren of interception markers\n return pathname.replace(new RegExp(`\\\\)${PARAM_SEPARATOR}`, 'g'), ')')\n}\n\n/**\n * Strips normalization separators from extracted route parameters.\n * Used by both server and client code to clean up parameters after route matching.\n */\nexport function stripParameterSeparators(\n params: Record\n): Record {\n const cleaned: Record = {}\n\n for (const [key, value] of Object.entries(params)) {\n if (typeof value === 'string') {\n // Remove the separator if it appears at the start of parameter values\n cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n } else if (Array.isArray(value)) {\n // Handle array parameters (from repeated route segments)\n cleaned[key] = value.map((item) =>\n typeof item === 'string'\n ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n : item\n )\n } else {\n cleaned[key] = value\n }\n }\n\n return cleaned\n}\n"],"names":["PARAM_SEPARATOR","hasAdjacentParameterIssues","route","test","normalizeAdjacentParameters","normalized","replace","normalizeTokensForRegexp","tokens","map","token","modifier","prefix","suffix","stripNormalizedSeparators","pathname","RegExp","stripParameterSeparators","params","cleaned","key","value","Object","entries","Array","isArray","item"],"mappings":"AAEA;;;;;;;CAOC,GAED;;;;CAIC,GACD,OAAO,MAAMA,kBAAkB,YAAW;AAE1C;;CAEC,GACD,OAAO,SAASC,2BAA2BC,KAAa;IACtD,I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AEA;;;CAGC,GACD,OAAO,SAASiB,yBACdC,MAA2B;IAE3B,MAAMC,UAA+B,CAAC;IAEtC,KAAK,MAAM,CAACC,KAAKC,MAAM,IAAIC,OAAOC,OAAO,CAACL,QAAS;QACjD,IAAI,OAAOG,UAAU,UAAU;YAC7B,sEAAsE;YACtEF,OAAO,CAACC,IAAI,GAAGC,MAAMf,OAAO,CAAC,IAAIU,OAAO,CAAC,CAAC,EAAEhB,iBAAiB,GAAG;QAClE,OAAO,IAAIwB,MAAMC,OAAO,CAACJ,QAAQ;YAC/B,yDAAyD;YACzDF,OAAO,CAACC,IAAI,GAAGC,MAAMZ,GAAG,CAAC,CAACiB,OACxB,OAAOA,SAAS,WACZA,KAAKpB,OAAO,CAAC,IAAIU,OAAO,CAAC,CAAC,EAAEhB,iBAAiB,GAAG,MAChD0B;QAER,OAAO;YACLP,OAAO,CAACC,IAAI,GAAGC;QACjB;IACF;IAEA,OAAOF;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/scheduler.js b/e-commerce/node_modules/next/dist/esm/lib/scheduler.js
new file mode 100644
index 0000000000000000000000000000000000000000..ef98cebc7d312dcba112893ba18e5aa2b2302b17
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/scheduler.js
@@ -0,0 +1,56 @@
+/**
+ * Schedules a function to be called on the next tick after the other promises
+ * have been resolved.
+ *
+ * @param cb the function to schedule
+ */ export const scheduleOnNextTick = (cb)=>{
+ // We use Promise.resolve().then() here so that the operation is scheduled at
+ // the end of the promise job queue, we then add it to the next process tick
+ // to ensure it's evaluated afterwards.
+ //
+ // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255
+ //
+ Promise.resolve().then(()=>{
+ if (process.env.NEXT_RUNTIME === 'edge') {
+ setTimeout(cb, 0);
+ } else {
+ process.nextTick(cb);
+ }
+ });
+};
+/**
+ * Schedules a function to be called using `setImmediate` or `setTimeout` if
+ * `setImmediate` is not available (like in the Edge runtime).
+ *
+ * @param cb the function to schedule
+ */ export const scheduleImmediate = (cb)=>{
+ if (process.env.NEXT_RUNTIME === 'edge') {
+ setTimeout(cb, 0);
+ } else {
+ setImmediate(cb);
+ }
+};
+/**
+ * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in
+ * will be the next task but if you await it you can at least be sure that the current task is over and
+ * most usefully that the entire microtask queue of the current task has been emptied.
+ */ export function atLeastOneTask() {
+ return new Promise((resolve)=>scheduleImmediate(resolve));
+}
+/**
+ * This utility function is extracted to make it easier to find places where we are doing
+ * specific timing tricks to try to schedule work after React has rendered. This is especially
+ * important at the moment because Next.js uses the edge builds of React which use setTimeout to
+ * schedule work when you might expect that something like setImmediate would do the trick.
+ *
+ * Long term we should switch to the node versions of React rendering when possible and then
+ * update this to use setImmediate rather than setTimeout
+ */ export function waitAtLeastOneReactRenderTask() {
+ if (process.env.NEXT_RUNTIME === 'edge') {
+ return new Promise((r)=>setTimeout(r, 0));
+ } else {
+ return new Promise((r)=>setImmediate(r));
+ }
+}
+
+//# sourceMappingURL=scheduler.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/scheduler.js.map b/e-commerce/node_modules/next/dist/esm/lib/scheduler.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..7e0f92b0652403c0c9cd68062ed6c4b874f1c728
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/scheduler.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/scheduler.ts"],"sourcesContent":["export type ScheduledFn = () => T | PromiseLike\nexport type SchedulerFn = (cb: ScheduledFn) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn) => {\n // We use Promise.resolve().then() here so that the operation is scheduled at\n // the end of the promise job queue, we then add it to the next process tick\n // to ensure it's evaluated afterwards.\n //\n // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n //\n Promise.resolve().then(() => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n process.nextTick(cb)\n }\n })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn): void => {\n if (process.env.NEXT_RUNTIME === 'edge') {\n setTimeout(cb, 0)\n } else {\n setImmediate(cb)\n }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n return new Promise((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise {\n if (process.env.NEXT_RUNTIME === 'edge') {\n return new Promise((r) => setTimeout(r, 0))\n } else {\n return new Promise((r) => setImmediate(r))\n }\n}\n"],"names":["scheduleOnNextTick","cb","Promise","resolve","then","process","env","NEXT_RUNTIME","setTimeout","nextTick","scheduleImmediate","setImmediate","atLeastOneTask","waitAtLeastOneReactRenderTask","r"],"mappings":"AAGA;;;;;CAKC,GACD,OAAO,MAAMA,qBAAqB,CAACC;IACjC,6EAA6E;IAC7E,4EAA4E;IAC5E,uCAAuC;IACvC,EAAE;IACF,kLAAkL;IAClL,EAAE;IACFC,QAAQC,OAAO,GAAGC,IAAI,CAAC;QACrB,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;YACvCC,WAAWP,IAAI;QACjB,OAAO;YACLI,QAAQI,QAAQ,CAACR;QACnB;IACF;AACF,EAAC;AAED;;;;;CAKC,GACD,OAAO,MAAMS,oBAAoB,CAACT;IAChC,IAAII,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;QACvCC,WAAWP,IAAI;IACjB,OAAO;QACLU,aAAaV;IACf;AACF,EAAC;AAED;;;;CAIC,GACD,OAAO,SAASW;IACd,OAAO,IAAIV,QAAc,CAACC,UAAYO,kBAAkBP;AAC1D;AAEA;;;;;;;;CAQC,GACD,OAAO,SAASU;IACd,IAAIR,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;QACvC,OAAO,IAAIL,QAAQ,CAACY,IAAMN,WAAWM,GAAG;IAC1C,OAAO;QACL,OAAO,IAAIZ,QAAQ,CAACY,IAAMH,aAAaG;IACzC;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/semver-noop.js b/e-commerce/node_modules/next/dist/esm/lib/semver-noop.js
new file mode 100644
index 0000000000000000000000000000000000000000..bb90d3d0b64d490435e0e4f56b8d22181a9ff7d5
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/semver-noop.js
@@ -0,0 +1,8 @@
+// DO NOT MODIFY THIS FILE DIRECTLY
+// It's for aliasing the `semver` package to be a noop for the `jsonwebtoken` package.
+// We're trying to minimize the size of the worker bundle.
+export function satisfies() {
+ return true;
+}
+
+//# sourceMappingURL=semver-noop.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/semver-noop.js.map b/e-commerce/node_modules/next/dist/esm/lib/semver-noop.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..fdef0d85839579a79816d8a5479c91c185493c0b
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/semver-noop.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/semver-noop.ts"],"sourcesContent":["// DO NOT MODIFY THIS FILE DIRECTLY\n// It's for aliasing the `semver` package to be a noop for the `jsonwebtoken` package.\n// We're trying to minimize the size of the worker bundle.\n\nexport function satisfies() {\n return true\n}\n"],"names":["satisfies"],"mappings":"AAAA,mCAAmC;AACnC,sFAAsF;AACtF,0DAA0D;AAE1D,OAAO,SAASA;IACd,OAAO;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/server-external-packages.jsonc b/e-commerce/node_modules/next/dist/esm/lib/server-external-packages.jsonc
new file mode 100644
index 0000000000000000000000000000000000000000..fd596ddcb21a7e95607a01ee770a7053208096bd
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/server-external-packages.jsonc
@@ -0,0 +1,103 @@
+[
+ // alineacms.com generates this package at build time and it should not end up in a cache (much like the @prisma/client package)
+ "@alinea/generated",
+ "@appsignal/nodejs",
+ "@aws-sdk/client-s3",
+ "@aws-sdk/s3-presigned-post",
+ "@blockfrost/blockfrost-js",
+ "@highlight-run/node",
+ "@huggingface/transformers",
+ "@jpg-store/lucid-cardano",
+ "@libsql/client",
+ "@mikro-orm/core",
+ "@mikro-orm/knex",
+ "@node-rs/argon2",
+ "@node-rs/bcrypt",
+ "@prisma/client",
+ "@react-pdf/renderer",
+ // Native Node.js addons
+ "@sentry/profiling-node",
+ "@sparticuz/chromium",
+ "@sparticuz/chromium-min",
+ // Native Node.js addons
+ "@statsig/statsig-node-core",
+ // Native Node.js addons
+ "@swc/core",
+ "@xenova/transformers",
+ // Builds on top of @prisma/client so dynamically loads the version.
+ "@zenstackhq/runtime",
+ "argon2",
+ "autoprefixer",
+ "aws-crt",
+ "bcrypt",
+ "better-sqlite3",
+ "canvas",
+ "chromadb-default-embed",
+ // Contains an unconditional require to a undeclared dependency 'coffee-script'
+ "config",
+ // Native Node.js addons
+ "cpu-features",
+ "cypress",
+ "dd-trace",
+ "eslint",
+ "express",
+ "firebase-admin",
+ "htmlrewriter",
+ // Patches the module system to shim modules
+ "import-in-the-middle",
+ // Native Node.js addons
+ "isolated-vm",
+ "jest",
+ "jsdom",
+ // Used to contain a very dynamic require to load the DB backend:
+ // https://github.com/jaredwray/keyv/blob/78b247b5b7a8c9b12154fbfae4295d6fb29158cf/packages/keyv/src/index.js#L22
+ "keyv",
+ "libsql",
+ "mdx-bundler",
+ "mongodb",
+ "mongoose",
+ "newrelic",
+ "next-mdx-remote",
+ "next-seo",
+ "node-cron",
+ "node-pty",
+ "node-web-audio-api",
+ "onnxruntime-node",
+ "oslo",
+ "pg",
+ // pino@10.1.0/lib/transport.js passes `join(__dirname, 'worker.js')` to thread-stream which ends
+ // up `require`ing that filepath, leading to
+ // `Cannot find module '/ROOT/node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/worker.js'`
+ "pino",
+ // A "plugin" that is passed to pino as a string (and is then required in a worker)
+ "pino-pretty",
+ // A "plugin" that is passed to pino as a string (and is then required in a worker)
+ "pino-roll",
+ "playwright",
+ "playwright-core",
+ "postcss",
+ "prettier",
+ "prisma",
+ "puppeteer",
+ "puppeteer-core",
+ "ravendb",
+ // Patches the module system to shim modules
+ "require-in-the-middle",
+ "rimraf",
+ // Native Node.js addons
+ "sharp",
+ "shiki",
+ "sqlite3",
+ // dynamic `new Worker` call in thread-stream@3.1.0/index.js which pulls in various non-code files
+ // as well (trying to parse README and invalid test files)
+ "thread-stream",
+ // Slow to compile because it pulls in typescript
+ "ts-morph",
+ "ts-node",
+ "typescript",
+ "vscode-oniguruma",
+ "webpack",
+ "websocket",
+ // Native Node.js addons
+ "zeromq",
+]
diff --git a/e-commerce/node_modules/next/dist/esm/lib/setup-exception-listeners.js b/e-commerce/node_modules/next/dist/esm/lib/setup-exception-listeners.js
new file mode 100644
index 0000000000000000000000000000000000000000..8a3f3ee59a500e0937d73e4273c0167243baf3d1
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/setup-exception-listeners.js
@@ -0,0 +1,10 @@
+process.on('uncaughtException', (err)=>{
+ console.error('uncaughtException', err);
+ process.exit(1);
+});
+process.on('unhandledRejection', (err)=>{
+ console.error('unhandledRejection', err);
+ process.exit(1);
+});
+
+//# sourceMappingURL=setup-exception-listeners.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/setup-exception-listeners.js.map b/e-commerce/node_modules/next/dist/esm/lib/setup-exception-listeners.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..1b53c43be2e979c2d6a16313ddcd7d03025758bb
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/setup-exception-listeners.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/setup-exception-listeners.ts"],"sourcesContent":["process.on('uncaughtException', (err) => {\n console.error('uncaughtException', err)\n process.exit(1)\n})\n\nprocess.on('unhandledRejection', (err) => {\n console.error('unhandledRejection', err)\n process.exit(1)\n})\n"],"names":["process","on","err","console","error","exit"],"mappings":"AAAAA,QAAQC,EAAE,CAAC,qBAAqB,CAACC;IAC/BC,QAAQC,KAAK,CAAC,qBAAqBF;IACnCF,QAAQK,IAAI,CAAC;AACf;AAEAL,QAAQC,EAAE,CAAC,sBAAsB,CAACC;IAChCC,QAAQC,KAAK,CAAC,sBAAsBF;IACpCF,QAAQK,IAAI,CAAC;AACf","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/static-env.js b/e-commerce/node_modules/next/dist/esm/lib/static-env.js
new file mode 100644
index 0000000000000000000000000000000000000000..0cc12b1aa6474ca4a25d55c68af5b50023142761
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/static-env.js
@@ -0,0 +1,62 @@
+function errorIfEnvConflicted(config, key) {
+ const isPrivateKey = /^(?:NODE_.+)|^(?:__.+)$/i.test(key);
+ const hasNextRuntimeKey = key === 'NEXT_RUNTIME';
+ if (isPrivateKey || hasNextRuntimeKey) {
+ throw new Error(`The key "${key}" under "env" in ${config.configFileName || 'config'} is not allowed. https://nextjs.org/docs/messages/env-key-not-allowed`);
+ }
+}
+/**
+ * Collects all environment variables that are using the `NEXT_PUBLIC_` prefix.
+ */ export function getNextPublicEnvironmentVariables() {
+ const defineEnv = [];
+ for(const key in process.env){
+ if (key.startsWith('NEXT_PUBLIC_')) {
+ const value = process.env[key];
+ if (value != null) {
+ defineEnv.push([
+ `process.env.${key}`,
+ value
+ ]);
+ }
+ }
+ }
+ defineEnv.sort((a, b)=>a[0].localeCompare(b[0]));
+ return Object.fromEntries(defineEnv);
+}
+/**
+ * Collects the `env` config value from the Next.js config.
+ */ export function getNextConfigEnv(config) {
+ // Refactored code below to use for-of
+ const defineEnv = {};
+ const env = config.env;
+ for(const key in env){
+ const value = env[key];
+ if (value != null) {
+ errorIfEnvConflicted(config, key);
+ defineEnv[`process.env.${key}`] = value;
+ }
+ }
+ return defineEnv;
+}
+export function getStaticEnv(config, deploymentId) {
+ const staticEnv = {
+ ...getNextPublicEnvironmentVariables(),
+ ...getNextConfigEnv(config),
+ 'process.env.NEXT_DEPLOYMENT_ID': deploymentId
+ };
+ return staticEnv;
+}
+export function populateStaticEnv(config, deploymentId) {
+ // since inlining comes after static generation we need
+ // to ensure this value is assigned to process env so it
+ // can still be accessed
+ const staticEnv = getStaticEnv(config, deploymentId);
+ for(const key in staticEnv){
+ const innerKey = key.split('.').pop() || '';
+ if (!process.env[innerKey]) {
+ process.env[innerKey] = staticEnv[key] || '';
+ }
+ }
+}
+
+//# sourceMappingURL=static-env.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/static-env.js.map b/e-commerce/node_modules/next/dist/esm/lib/static-env.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..194bee79b7acaadb8b484111ce179a47820d173f
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/static-env.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/static-env.ts"],"sourcesContent":["import type {\n NextConfigComplete,\n NextConfigRuntime,\n} from '../server/config-shared'\n\nfunction errorIfEnvConflicted(\n config: NextConfigComplete | NextConfigRuntime,\n key: string\n) {\n const isPrivateKey = /^(?:NODE_.+)|^(?:__.+)$/i.test(key)\n const hasNextRuntimeKey = key === 'NEXT_RUNTIME'\n\n if (isPrivateKey || hasNextRuntimeKey) {\n throw new Error(\n `The key \"${key}\" under \"env\" in ${config.configFileName || 'config'} is not allowed. https://nextjs.org/docs/messages/env-key-not-allowed`\n )\n }\n}\n\n/**\n * Collects all environment variables that are using the `NEXT_PUBLIC_` prefix.\n */\nexport function getNextPublicEnvironmentVariables() {\n const defineEnv: [string, string | undefined][] = []\n for (const key in process.env) {\n if (key.startsWith('NEXT_PUBLIC_')) {\n const value = process.env[key]\n if (value != null) {\n defineEnv.push([`process.env.${key}`, value])\n }\n }\n }\n defineEnv.sort((a, b) => a[0].localeCompare(b[0]))\n return Object.fromEntries(defineEnv)\n}\n\n/**\n * Collects the `env` config value from the Next.js config.\n */\nexport function getNextConfigEnv(\n config: NextConfigComplete | NextConfigRuntime\n) {\n // Refactored code below to use for-of\n const defineEnv: Record = {}\n const env = config.env\n for (const key in env) {\n const value = env[key]\n if (value != null) {\n errorIfEnvConflicted(config, key)\n defineEnv[`process.env.${key}`] = value\n }\n }\n return defineEnv\n}\n\nexport function getStaticEnv(\n config: NextConfigComplete | NextConfigRuntime,\n deploymentId: string\n) {\n const staticEnv: Record = {\n ...getNextPublicEnvironmentVariables(),\n ...getNextConfigEnv(config),\n 'process.env.NEXT_DEPLOYMENT_ID': deploymentId,\n }\n return staticEnv\n}\n\nexport function populateStaticEnv(\n config: NextConfigComplete | NextConfigRuntime,\n deploymentId: string\n) {\n // since inlining comes after static generation we need\n // to ensure this value is assigned to process env so it\n // can still be accessed\n const staticEnv = getStaticEnv(config, deploymentId)\n for (const key in staticEnv) {\n const innerKey = key.split('.').pop() || ''\n if (!process.env[innerKey]) {\n process.env[innerKey] = staticEnv[key] || ''\n }\n }\n}\n"],"names":["errorIfEnvConflicted","config","key","isPrivateKey","test","hasNextRuntimeKey","Error","configFileName","getNextPublicEnvironmentVariables","defineEnv","process","env","startsWith","value","push","sort","a","b","localeCompare","Object","fromEntries","getNextConfigEnv","getStaticEnv","deploymentId","staticEnv","populateStaticEnv","innerKey","split","pop"],"mappings":"AAKA,SAASA,qBACPC,MAA8C,EAC9CC,GAAW;IAEX,MAAMC,eAAe,2BAA2BC,IAAI,CAACF;IACrD,MAAMG,oBAAoBH,QAAQ;IAElC,IAAIC,gBAAgBE,mBAAmB;QACrC,MAAM,IAAIC,MACR,CAAC,SAAS,EAAEJ,IAAI,iBAAiB,EAAED,OAAOM,cAAc,IAAI,SAAS,qEAAqE,CAAC;IAE/I;AACF;AAEA;;CAEC,GACD,OAAO,SAASC;IACd,MAAMC,YAA4C,EAAE;IACpD,IAAK,MAAMP,OAAOQ,QAAQC,GAAG,CAAE;QAC7B,IAAIT,IAAIU,UAAU,CAAC,iBAAiB;YAClC,MAAMC,QAAQH,QAAQC,GAAG,CAACT,IAAI;YAC9B,IAAIW,SAAS,MAAM;gBACjBJ,UAAUK,IAAI,CAAC;oBAAC,CAAC,YAAY,EAAEZ,KAAK;oBAAEW;iBAAM;YAC9C;QACF;IACF;IACAJ,UAAUM,IAAI,CAAC,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,aAAa,CAACD,CAAC,CAAC,EAAE;IAChD,OAAOE,OAAOC,WAAW,CAACX;AAC5B;AAEA;;CAEC,GACD,OAAO,SAASY,iBACdpB,MAA8C;IAE9C,sCAAsC;IACtC,MAAMQ,YAAgD,CAAC;IACvD,MAAME,MAAMV,OAAOU,GAAG;IACtB,IAAK,MAAMT,OAAOS,IAAK;QACrB,MAAME,QAAQF,GAAG,CAACT,IAAI;QACtB,IAAIW,SAAS,MAAM;YACjBb,qBAAqBC,QAAQC;YAC7BO,SAAS,CAAC,CAAC,YAAY,EAAEP,KAAK,CAAC,GAAGW;QACpC;IACF;IACA,OAAOJ;AACT;AAEA,OAAO,SAASa,aACdrB,MAA8C,EAC9CsB,YAAoB;IAEpB,MAAMC,YAAgD;QACpD,GAAGhB,mCAAmC;QACtC,GAAGa,iBAAiBpB,OAAO;QAC3B,kCAAkCsB;IACpC;IACA,OAAOC;AACT;AAEA,OAAO,SAASC,kBACdxB,MAA8C,EAC9CsB,YAAoB;IAEpB,uDAAuD;IACvD,wDAAwD;IACxD,wBAAwB;IACxB,MAAMC,YAAYF,aAAarB,QAAQsB;IACvC,IAAK,MAAMrB,OAAOsB,UAAW;QAC3B,MAAME,WAAWxB,IAAIyB,KAAK,CAAC,KAAKC,GAAG,MAAM;QACzC,IAAI,CAAClB,QAAQC,GAAG,CAACe,SAAS,EAAE;YAC1BhB,QAAQC,GAAG,CAACe,SAAS,GAAGF,SAAS,CAACtB,IAAI,IAAI;QAC5C;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/try-to-parse-path.js b/e-commerce/node_modules/next/dist/esm/lib/try-to-parse-path.js
new file mode 100644
index 0000000000000000000000000000000000000000..29e2eaba63c3a788df1fc08116a8301be71f2c23
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/try-to-parse-path.js
@@ -0,0 +1,58 @@
+import { parse, tokensToRegexp } from 'next/dist/compiled/path-to-regexp';
+import isError from './is-error';
+import { normalizeTokensForRegexp } from './route-pattern-normalizer';
+/**
+ * If there is an error show our error link but still show original error or
+ * a formatted one if we can
+ */ function reportError({ route, parsedPath }, err) {
+ let errMatches;
+ if (isError(err) && (errMatches = err.message.match(/at (\d{0,})/))) {
+ const position = parseInt(errMatches[1], 10);
+ console.error(`\nError parsing \`${route}\` ` + `https://nextjs.org/docs/messages/invalid-route-source\n` + `Reason: ${err.message}\n\n` + ` ${parsedPath}\n` + ` ${new Array(position).fill(' ').join('')}^\n`);
+ } else {
+ console.error(`\nError parsing ${route} https://nextjs.org/docs/messages/invalid-route-source`, err);
+ }
+}
+/**
+ * Safe wrapper around tokensToRegexp that handles path-to-regexp 6.3.0+ validation errors.
+ */ function safeTokensToRegexp(tokens) {
+ try {
+ return tokensToRegexp(tokens);
+ } catch (error) {
+ if (isError(error)) {
+ // Try to normalize tokens with repeating modifiers but no prefix/suffix
+ const normalizedTokens = normalizeTokensForRegexp(tokens);
+ return tokensToRegexp(normalizedTokens);
+ }
+ throw error;
+ }
+}
+/**
+ * Attempts to parse a given route with `path-to-regexp` and returns an object
+ * with the result. Whenever an error happens on parse, it will print an error
+ * attempting to find the error position and showing a link to the docs. When
+ * `handleUrl` is set to `true` it will also attempt to parse the route
+ * and use the resulting pathname to parse with `path-to-regexp`.
+ */ export function tryToParsePath(route, options) {
+ const result = {
+ route,
+ parsedPath: route
+ };
+ try {
+ if (options == null ? void 0 : options.handleUrl) {
+ const parsed = new URL(route, 'http://n');
+ result.parsedPath = `${parsed.pathname}${parsed.hash || ''}`;
+ }
+ result.tokens = parse(result.parsedPath);
+ // Use safe wrapper instead of proactive detection
+ if (result.tokens) {
+ result.regexStr = safeTokensToRegexp(result.tokens).source;
+ }
+ } catch (err) {
+ reportError(result, err);
+ result.error = err;
+ }
+ return result;
+}
+
+//# sourceMappingURL=try-to-parse-path.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/try-to-parse-path.js.map b/e-commerce/node_modules/next/dist/esm/lib/try-to-parse-path.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..566d4e3d8cb6a0e288f5535e1207c1c91658adba
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/try-to-parse-path.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/try-to-parse-path.ts"],"sourcesContent":["import type { Token } from 'next/dist/compiled/path-to-regexp'\nimport { parse, tokensToRegexp } from 'next/dist/compiled/path-to-regexp'\nimport isError from './is-error'\nimport { normalizeTokensForRegexp } from './route-pattern-normalizer'\n\ninterface ParseResult {\n error?: any\n parsedPath: string\n regexStr?: string\n route: string\n tokens?: Token[]\n}\n\n/**\n * If there is an error show our error link but still show original error or\n * a formatted one if we can\n */\nfunction reportError({ route, parsedPath }: ParseResult, err: any) {\n let errMatches\n if (isError(err) && (errMatches = err.message.match(/at (\\d{0,})/))) {\n const position = parseInt(errMatches[1], 10)\n console.error(\n `\\nError parsing \\`${route}\\` ` +\n `https://nextjs.org/docs/messages/invalid-route-source\\n` +\n `Reason: ${err.message}\\n\\n` +\n ` ${parsedPath}\\n` +\n ` ${new Array(position).fill(' ').join('')}^\\n`\n )\n } else {\n console.error(\n `\\nError parsing ${route} https://nextjs.org/docs/messages/invalid-route-source`,\n err\n )\n }\n}\n\n/**\n * Safe wrapper around tokensToRegexp that handles path-to-regexp 6.3.0+ validation errors.\n */\nfunction safeTokensToRegexp(tokens: Token[]): RegExp {\n try {\n return tokensToRegexp(tokens)\n } catch (error) {\n if (isError(error)) {\n // Try to normalize tokens with repeating modifiers but no prefix/suffix\n const normalizedTokens = normalizeTokensForRegexp(tokens)\n return tokensToRegexp(normalizedTokens)\n }\n throw error\n }\n}\n\n/**\n * Attempts to parse a given route with `path-to-regexp` and returns an object\n * with the result. Whenever an error happens on parse, it will print an error\n * attempting to find the error position and showing a link to the docs. When\n * `handleUrl` is set to `true` it will also attempt to parse the route\n * and use the resulting pathname to parse with `path-to-regexp`.\n */\nexport function tryToParsePath(\n route: string,\n options?: {\n handleUrl?: boolean\n }\n): ParseResult {\n const result: ParseResult = { route, parsedPath: route }\n try {\n if (options?.handleUrl) {\n const parsed = new URL(route, 'http://n')\n result.parsedPath = `${parsed.pathname}${parsed.hash || ''}`\n }\n\n result.tokens = parse(result.parsedPath)\n\n // Use safe wrapper instead of proactive detection\n if (result.tokens) {\n result.regexStr = safeTokensToRegexp(result.tokens).source\n }\n } catch (err) {\n reportError(result, err)\n result.error = err\n }\n\n return result\n}\n"],"names":["parse","tokensToRegexp","isError","normalizeTokensForRegexp","reportError","route","parsedPath","err","errMatches","message","match","position","parseInt","console","error","Array","fill","join","safeTokensToRegexp","tokens","normalizedTokens","tryToParsePath","options","result","handleUrl","parsed","URL","pathname","hash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OG,IAAI,IAAI,IAAI;QAC9D;QAEAL,OAAOJ,MAAM,GAAGnB,MAAMuB,OAAOjB,UAAU;QAEvC,kDAAkD;QAClD,IAAIiB,OAAOJ,MAAM,EAAE;YACjBI,OAAOM,QAAQ,GAAGX,mBAAmBK,OAAOJ,MAAM,EAAEW,MAAM;QAC5D;IACF,EAAE,OAAOvB,KAAK;QACZH,YAAYmB,QAAQhB;QACpBgB,OAAOT,KAAK,GAAGP;IACjB;IAEA,OAAOgB;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/turbopack-cache-seed.js b/e-commerce/node_modules/next/dist/esm/lib/turbopack-cache-seed.js
new file mode 100644
index 0000000000000000000000000000000000000000..c98bbd0ac364ce2340dfd75c536fb63042e27dc4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/turbopack-cache-seed.js
@@ -0,0 +1,115 @@
+import fs from 'fs';
+import path from 'path';
+import * as Log from '../build/output/log';
+import { getTurbopackCacheVersion } from '../build/swc';
+import { getGitWorktreeInfo, listLinkedWorktreeRoots } from './git-worktree';
+export function seedTurbopackCacheIfNeeded({ projectDir, distDir }) {
+ // This gets the version assuming that nothing is dirty.
+ // If things are dirty, turbopack would write things
+ // in a different location. There are other circumstances
+ // as well. This only matters for people developing turbopack
+ // see handle_db_versioning in turbotask backend for more details.
+ const version = getTurbopackCacheVersion();
+ if (!version) return;
+ const worktreeInfo = getGitWorktreeInfo(projectDir);
+ if (!worktreeInfo) return;
+ const cacheDir = path.join(distDir, 'cache', 'turbopack');
+ const targetVersionDir = path.join(cacheDir, version);
+ if (dirHasEntries(targetVersionDir)) return;
+ let sourceVersionDir;
+ try {
+ sourceVersionDir = findSeedSource(worktreeInfo, projectDir, distDir, version);
+ } catch {
+ return;
+ }
+ if (!sourceVersionDir) return;
+ const tmpDir = `${targetVersionDir}.seeding`;
+ // Making sure we don't copy partial data if process interrupted
+ // There is a potential race condition here
+ // if someone wrote to the cache while we were seeding it
+ // but with the immutable design and all that, I'm not super worried
+ try {
+ fs.mkdirSync(cacheDir, {
+ recursive: true
+ });
+ fs.rmSync(tmpDir, {
+ recursive: true,
+ force: true
+ });
+ seedCacheDir(sourceVersionDir, tmpDir);
+ fs.renameSync(tmpDir, targetVersionDir);
+ Log.info(`Seeded Turbopack cache from ${sourceVersionDir}.`);
+ } catch {
+ fs.rmSync(tmpDir, {
+ recursive: true,
+ force: true
+ });
+ Log.warn(`Failed to seed Turbopack cache from ${sourceVersionDir} to ${targetVersionDir}.`);
+ }
+}
+function findSeedSource(worktreeInfo, projectDir, distDir, version) {
+ const projectRelToWorktree = path.relative(worktreeInfo.worktreeRoot, projectDir);
+ const distRelToProject = path.relative(projectDir, distDir);
+ const currentWorktree = path.resolve(worktreeInfo.worktreeRoot);
+ // We are going to find the best candidate worktree
+ // based on the most recently written cache directory.
+ // We only look at our version
+ let best;
+ for (const root of [
+ worktreeInfo.mainRepoRoot,
+ ...listLinkedWorktreeRoots(worktreeInfo.mainRepoRoot)
+ ]){
+ if (path.resolve(root) === currentWorktree) continue;
+ const versionDir = path.join(root, projectRelToWorktree, distRelToProject, 'cache', 'turbopack', version);
+ const commitTimeMs = currentCommitTimeMs(versionDir);
+ if (commitTimeMs === undefined) continue;
+ if (!best || commitTimeMs > best.commitTimeMs) {
+ best = {
+ versionDir,
+ commitTimeMs
+ };
+ }
+ }
+ return best == null ? void 0 : best.versionDir;
+}
+// When the cache in `versionDir` was last committed to, in epoch milliseconds, or undefined if
+// there is no usable cache there. Read from the `commit_time` the persistence layer records in
+// CURRENT.
+function currentCommitTimeMs(versionDir) {
+ let commitTime;
+ try {
+ commitTime = JSON.parse(fs.readFileSync(path.join(versionDir, 'CURRENT'), 'utf8')).commit_time;
+ } catch {
+ // missing, unreadable, or not valid JSON - treat it as not a seed candidate
+ return undefined;
+ }
+ if (typeof commitTime !== 'string') return undefined;
+ const parsed = Date.parse(commitTime);
+ return Number.isNaN(parsed) ? undefined : parsed;
+}
+function dirHasEntries(dir) {
+ try {
+ return fs.readdirSync(dir).length > 0;
+ } catch {
+ return false;
+ }
+}
+const IMMUTABLE_CACHE_FILE = /\.(sst|blob|meta|del)$/;
+function seedCacheDir(src, dst) {
+ const stat = fs.lstatSync(src);
+ if (stat.isDirectory()) {
+ fs.mkdirSync(dst, {
+ recursive: true
+ });
+ for (const name of fs.readdirSync(src)){
+ seedCacheDir(path.join(src, name), path.join(dst, name));
+ }
+ } else if (IMMUTABLE_CACHE_FILE.test(src)) {
+ fs.linkSync(src, dst);
+ } else {
+ // Mutable/unknown (CURRENT, LOG, …) - copy so it gets its own inode.
+ fs.copyFileSync(src, dst);
+ }
+}
+
+//# sourceMappingURL=turbopack-cache-seed.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/turbopack-cache-seed.js.map b/e-commerce/node_modules/next/dist/esm/lib/turbopack-cache-seed.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..49f7a1347681f656d8bd4e687c8a660c41991777
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/turbopack-cache-seed.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/turbopack-cache-seed.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\nimport * as Log from '../build/output/log'\nimport { getTurbopackCacheVersion } from '../build/swc'\nimport {\n getGitWorktreeInfo,\n listLinkedWorktreeRoots,\n type GitWorktreeInfo,\n} from './git-worktree'\n\nexport function seedTurbopackCacheIfNeeded({\n projectDir,\n distDir,\n}: {\n projectDir: string\n distDir: string\n}): void {\n // This gets the version assuming that nothing is dirty.\n // If things are dirty, turbopack would write things\n // in a different location. There are other circumstances\n // as well. This only matters for people developing turbopack\n // see handle_db_versioning in turbotask backend for more details.\n const version = getTurbopackCacheVersion()\n if (!version) return\n\n const worktreeInfo = getGitWorktreeInfo(projectDir)\n if (!worktreeInfo) return\n\n const cacheDir = path.join(distDir, 'cache', 'turbopack')\n const targetVersionDir = path.join(cacheDir, version)\n if (dirHasEntries(targetVersionDir)) return\n\n let sourceVersionDir: string | undefined\n try {\n sourceVersionDir = findSeedSource(\n worktreeInfo,\n projectDir,\n distDir,\n version\n )\n } catch {\n return\n }\n if (!sourceVersionDir) return\n\n const tmpDir = `${targetVersionDir}.seeding`\n // Making sure we don't copy partial data if process interrupted\n // There is a potential race condition here\n // if someone wrote to the cache while we were seeding it\n // but with the immutable design and all that, I'm not super worried\n try {\n fs.mkdirSync(cacheDir, { recursive: true })\n fs.rmSync(tmpDir, { recursive: true, force: true })\n seedCacheDir(sourceVersionDir, tmpDir)\n fs.renameSync(tmpDir, targetVersionDir)\n Log.info(`Seeded Turbopack cache from ${sourceVersionDir}.`)\n } catch {\n fs.rmSync(tmpDir, { recursive: true, force: true })\n Log.warn(\n `Failed to seed Turbopack cache from ${sourceVersionDir} to ${targetVersionDir}.`\n )\n }\n}\n\nfunction findSeedSource(\n worktreeInfo: GitWorktreeInfo,\n projectDir: string,\n distDir: string,\n version: string\n): string | undefined {\n const projectRelToWorktree = path.relative(\n worktreeInfo.worktreeRoot,\n projectDir\n )\n const distRelToProject = path.relative(projectDir, distDir)\n const currentWorktree = path.resolve(worktreeInfo.worktreeRoot)\n\n // We are going to find the best candidate worktree\n // based on the most recently written cache directory.\n // We only look at our version\n\n let best: { versionDir: string; commitTimeMs: number } | undefined\n for (const root of [\n worktreeInfo.mainRepoRoot,\n ...listLinkedWorktreeRoots(worktreeInfo.mainRepoRoot),\n ]) {\n if (path.resolve(root) === currentWorktree) continue\n const versionDir = path.join(\n root,\n projectRelToWorktree,\n distRelToProject,\n 'cache',\n 'turbopack',\n version\n )\n const commitTimeMs = currentCommitTimeMs(versionDir)\n if (commitTimeMs === undefined) continue\n if (!best || commitTimeMs > best.commitTimeMs) {\n best = { versionDir, commitTimeMs }\n }\n }\n return best?.versionDir\n}\n\n// When the cache in `versionDir` was last committed to, in epoch milliseconds, or undefined if\n// there is no usable cache there. Read from the `commit_time` the persistence layer records in\n// CURRENT.\nfunction currentCommitTimeMs(versionDir: string): number | undefined {\n let commitTime\n try {\n commitTime = JSON.parse(\n fs.readFileSync(path.join(versionDir, 'CURRENT'), 'utf8')\n ).commit_time\n } catch {\n // missing, unreadable, or not valid JSON - treat it as not a seed candidate\n return undefined\n }\n if (typeof commitTime !== 'string') return undefined\n const parsed = Date.parse(commitTime)\n return Number.isNaN(parsed) ? undefined : parsed\n}\n\nfunction dirHasEntries(dir: string): boolean {\n try {\n return fs.readdirSync(dir).length > 0\n } catch {\n return false\n }\n}\n\nconst IMMUTABLE_CACHE_FILE = /\\.(sst|blob|meta|del)$/\n\nfunction seedCacheDir(src: string, dst: string): void {\n const stat = fs.lstatSync(src)\n if (stat.isDirectory()) {\n fs.mkdirSync(dst, { recursive: true })\n for (const name of fs.readdirSync(src)) {\n seedCacheDir(path.join(src, name), path.join(dst, name))\n }\n } else if (IMMUTABLE_CACHE_FILE.test(src)) {\n fs.linkSync(src, dst)\n } else {\n // Mutable/unknown (CURRENT, LOG, …) - copy so it gets its own inode.\n fs.copyFileSync(src, dst)\n }\n}\n"],"names":["fs","path","Log","getTurbopackCacheVersion","getGitWorktreeInfo","listLinkedWorktreeRoots","seedTurbopackCacheIfNeeded","projectDir","distDir","version","worktreeInfo","cacheDir","join","targetVersionDir","dirHasEntries","sourceVersionDir","findSeedSource","tmpDir","mkdirSync","recursive","rmSync","force","seedCacheDir","renameSync","info","warn","projectRelToWorktree","relative","worktreeRoot","distRelToProject","currentWorktree","resolve","best","root","mainRepoRoot","versionDir","commitTimeMs","currentCommitTimeMs","undefined","commitTime","JSON","parse","readFileSync","commit_time","parsed","Date","Number","isNaN","dir","readdirSync","length","IMMUTABLE_CACHE_FILE","src","dst","stat","lstatSync","isDirectory","name","test","linkSync","copyFileSync"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AACvB,YAAYC,SAAS,sBAAqB;AAC1C,SAASC,wBAAwB,QAAQ,eAAc;AACvD,SACEC,kBAAkB,EACl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,GAAGkB,SAAS,CAACmC,KAAK;YAAElC,WAAW;QAAK;QACpC,KAAK,MAAMsC,QAAQzD,GAAGiD,WAAW,CAACG,KAAM;YACtC9B,aAAarB,KAAKW,IAAI,CAACwC,KAAKK,OAAOxD,KAAKW,IAAI,CAACyC,KAAKI;QACpD;IACF,OAAO,IAAIN,qBAAqBO,IAAI,CAACN,MAAM;QACzCpD,GAAG2D,QAAQ,CAACP,KAAKC;IACnB,OAAO;QACL,qEAAqE;QACrErD,GAAG4D,YAAY,CAACR,KAAKC;IACvB;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/turbopack-warning.js b/e-commerce/node_modules/next/dist/esm/lib/turbopack-warning.js
new file mode 100644
index 0000000000000000000000000000000000000000..924b9c5c54446b806edea5ff8e0e7d7c270463af
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/turbopack-warning.js
@@ -0,0 +1,129 @@
+import loadConfig from '../server/config';
+import * as Log from '../build/output/log';
+const unsupportedTurbopackNextConfigOptions = [
+ // Left to be implemented (priority)
+ // 'experimental.clientRouterFilter',
+ // 'experimental.optimizePackageImports',
+ // 'compiler.emotion',
+ // 'compiler.reactRemoveProperties',
+ // 'compiler.relay',
+ // 'compiler.removeConsole',
+ // 'compiler.styledComponents',
+ 'experimental.fetchCacheKeyPrefix',
+ // Left to be implemented
+ // 'excludeDefaultMomentLocales',
+ // 'experimental.optimizeServerReact',
+ 'experimental.clientRouterFilterAllowedRate',
+ // 'experimental.serverMinification',
+ // 'experimental.serverSourceMaps',
+ 'experimental.allowedRevalidateHeaderKeys',
+ 'experimental.extensionAlias',
+ 'experimental.fallbackNodePolyfills',
+ 'experimental.swcTraceProfiling',
+ // Left to be implemented (Might not be needed for Turbopack)
+ 'experimental.craCompat',
+ 'experimental.disablePostcssPresetEnv',
+ 'experimental.esmExternals',
+ // This is used to force swc-loader to run regardless of finding Babel.
+ 'experimental.forceSwcTransforms',
+ 'experimental.fullySpecified',
+ 'experimental.urlImports',
+ 'experimental.slowModuleDetection'
+];
+/** */ export async function validateTurboNextConfig({ dir, configPhase }) {
+ const { defaultConfig } = require('../server/config-shared');
+ const { cyan, red, underline } = require('../lib/picocolors');
+ const { interopDefault } = require('../lib/interop-default');
+ let unsupportedParts = '';
+ let hasWebpackConfig = false;
+ let hasTurboConfig = false;
+ const unsupportedConfig = [];
+ let rawNextConfig = {};
+ try {
+ rawNextConfig = interopDefault(await loadConfig(configPhase, dir, {
+ rawConfig: true
+ }));
+ if (typeof rawNextConfig === 'function') {
+ rawNextConfig = rawNextConfig(configPhase, {
+ defaultConfig
+ });
+ }
+ hasWebpackConfig = Boolean(rawNextConfig.webpack);
+ hasTurboConfig = Boolean(rawNextConfig.turbopack);
+ const flattenKeys = (obj, prefix = '')=>{
+ let keys = [];
+ for(const key in obj){
+ const value = obj == null ? void 0 : obj[key];
+ if (typeof value === 'undefined') {
+ continue;
+ }
+ const pre = prefix.length ? `${prefix}.` : '';
+ if (typeof value === 'object' && !Array.isArray(value) && value !== null) {
+ keys = keys.concat(flattenKeys(value, pre + key));
+ } else {
+ keys.push(pre + key);
+ }
+ }
+ return keys;
+ };
+ const getDeepValue = (obj, keys)=>{
+ if (typeof keys === 'string') {
+ keys = keys.split('.');
+ }
+ if (keys.length === 1) {
+ return obj == null ? void 0 : obj[keys == null ? void 0 : keys[0]];
+ }
+ return getDeepValue(obj == null ? void 0 : obj[keys == null ? void 0 : keys[0]], keys.slice(1));
+ };
+ const customKeys = flattenKeys(rawNextConfig);
+ for (const key of customKeys){
+ if (key.startsWith('experimental.turbo')) {
+ hasTurboConfig = true;
+ }
+ const isUnsupported = unsupportedTurbopackNextConfigOptions.some((unsupportedKey)=>// Either the key matches (or is a more specific subkey) of
+ // unsupportedKey, or the key is the path to a specific subkey.
+ // | key | unsupportedKey |
+ // |---------|----------------|
+ // | foo | foo |
+ // | foo.bar | foo |
+ // | foo | foo.bar |
+ key.startsWith(unsupportedKey) || unsupportedKey.startsWith(`${key}.`)) && getDeepValue(rawNextConfig, key) !== getDeepValue(defaultConfig, key);
+ if (isUnsupported) {
+ unsupportedConfig.push(key);
+ }
+ }
+ } catch (e) {
+ Log.error('Unexpected error occurred while checking config', e);
+ }
+ // If the build was defaulted to Turbopack, we want to warn about possibly ignored webpack
+ // configuration. Otherwise the user explicitly picked turbopack and thus we expect that
+ // they have configured it correctly.
+ if (process.env.TURBOPACK === 'auto' && hasWebpackConfig && !hasTurboConfig) {
+ const configFile = rawNextConfig.configFileName ?? 'your Next config file';
+ Log.error(`ERROR: This build is using Turbopack, with a \`webpack\` config and no \`turbopack\` config.
+ This may be a mistake.
+
+ As of Next.js 16 Turbopack is enabled by default and
+ custom webpack configurations may need to be migrated to Turbopack.
+
+ NOTE: your \`webpack\` config may have been added by a configuration plugin.
+
+ To configure Turbopack, see https://nextjs.org/docs/app/api-reference/next-config-js/turbopack
+
+ TIP: Many applications work fine under Turbopack with no configuration,
+ if that is the case for you, you can silence this error by passing the
+ \`--turbopack\` or \`--webpack\` flag explicitly or simply setting an
+ empty turbopack config in ${configFile} (e.g. \`turbopack: {}\`).`);
+ process.exit(1);
+ }
+ if (unsupportedConfig.length) {
+ unsupportedParts += `\n\n- Unsupported Next.js configuration option(s) (${cyan('next.config.js')})\n Turbopack will ignore the following configuration options:\n${unsupportedConfig.map((name)=>` - ${red(name)}\n`).join('')}`;
+ }
+ if (unsupportedParts) {
+ Log.error(`You are using configuration and/or tools that are not yet\nsupported by Next.js with Turbopack:\n${unsupportedParts}\n`);
+ Log.warn('Learn more about how to configure Turbopack with Next.js:\n' + underline('https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack'));
+ }
+ return rawNextConfig;
+}
+
+//# sourceMappingURL=turbopack-warning.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/turbopack-warning.js.map b/e-commerce/node_modules/next/dist/esm/lib/turbopack-warning.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..d34697cd25531c18b977d2bab18809d1ef5d89ba
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/turbopack-warning.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/turbopack-warning.ts"],"sourcesContent":["import type { NextConfigComplete } from '../server/config-shared'\nimport loadConfig from '../server/config'\nimport * as Log from '../build/output/log'\n\nconst unsupportedTurbopackNextConfigOptions = [\n // Left to be implemented (priority)\n // 'experimental.clientRouterFilter',\n // 'experimental.optimizePackageImports',\n // 'compiler.emotion',\n // 'compiler.reactRemoveProperties',\n // 'compiler.relay',\n // 'compiler.removeConsole',\n // 'compiler.styledComponents',\n 'experimental.fetchCacheKeyPrefix',\n\n // Left to be implemented\n // 'excludeDefaultMomentLocales',\n // 'experimental.optimizeServerReact',\n 'experimental.clientRouterFilterAllowedRate',\n // 'experimental.serverMinification',\n // 'experimental.serverSourceMaps',\n\n 'experimental.allowedRevalidateHeaderKeys',\n 'experimental.extensionAlias',\n 'experimental.fallbackNodePolyfills',\n\n 'experimental.swcTraceProfiling',\n\n // Left to be implemented (Might not be needed for Turbopack)\n 'experimental.craCompat',\n 'experimental.disablePostcssPresetEnv',\n 'experimental.esmExternals',\n // This is used to force swc-loader to run regardless of finding Babel.\n 'experimental.forceSwcTransforms',\n 'experimental.fullySpecified',\n 'experimental.urlImports',\n 'experimental.slowModuleDetection',\n]\n\n/** */\nexport async function validateTurboNextConfig({\n dir,\n configPhase,\n}: {\n dir: string\n configPhase: Parameters[0]\n}) {\n const { defaultConfig } =\n require('../server/config-shared') as typeof import('../server/config-shared')\n const { cyan, red, underline } =\n require('../lib/picocolors') as typeof import('../lib/picocolors')\n const { interopDefault } =\n require('../lib/interop-default') as typeof import('../lib/interop-default')\n\n let unsupportedParts = ''\n\n let hasWebpackConfig = false\n let hasTurboConfig = false\n\n const unsupportedConfig: string[] = []\n let rawNextConfig: NextConfigComplete = {} as NextConfigComplete\n\n try {\n rawNextConfig = interopDefault(\n await loadConfig(configPhase, dir, {\n rawConfig: true,\n })\n )\n\n if (typeof rawNextConfig === 'function') {\n rawNextConfig = (rawNextConfig as any)(configPhase, {\n defaultConfig,\n })\n }\n hasWebpackConfig = Boolean(rawNextConfig.webpack)\n hasTurboConfig = Boolean(rawNextConfig.turbopack)\n\n const flattenKeys = (obj: any, prefix: string = ''): string[] => {\n let keys: string[] = []\n\n for (const key in obj) {\n const value = obj?.[key]\n if (typeof value === 'undefined') {\n continue\n }\n\n const pre = prefix.length ? `${prefix}.` : ''\n\n if (\n typeof value === 'object' &&\n !Array.isArray(value) &&\n value !== null\n ) {\n keys = keys.concat(flattenKeys(value, pre + key))\n } else {\n keys.push(pre + key)\n }\n }\n\n return keys\n }\n\n const getDeepValue = (obj: any, keys: string | string[]): any => {\n if (typeof keys === 'string') {\n keys = keys.split('.')\n }\n if (keys.length === 1) {\n return obj?.[keys?.[0]]\n }\n return getDeepValue(obj?.[keys?.[0]], keys.slice(1))\n }\n\n const customKeys = flattenKeys(rawNextConfig)\n\n for (const key of customKeys) {\n if (key.startsWith('experimental.turbo')) {\n hasTurboConfig = true\n }\n\n const isUnsupported =\n unsupportedTurbopackNextConfigOptions.some(\n (unsupportedKey) =>\n // Either the key matches (or is a more specific subkey) of\n // unsupportedKey, or the key is the path to a specific subkey.\n // | key | unsupportedKey |\n // |---------|----------------|\n // | foo | foo |\n // | foo.bar | foo |\n // | foo | foo.bar |\n key.startsWith(unsupportedKey) ||\n unsupportedKey.startsWith(`${key}.`)\n ) &&\n getDeepValue(rawNextConfig, key) !== getDeepValue(defaultConfig, key)\n\n if (isUnsupported) {\n unsupportedConfig.push(key)\n }\n }\n } catch (e) {\n Log.error('Unexpected error occurred while checking config', e)\n }\n\n // If the build was defaulted to Turbopack, we want to warn about possibly ignored webpack\n // configuration. Otherwise the user explicitly picked turbopack and thus we expect that\n // they have configured it correctly.\n if (process.env.TURBOPACK === 'auto' && hasWebpackConfig && !hasTurboConfig) {\n const configFile = rawNextConfig.configFileName ?? 'your Next config file'\n Log.error(\n `ERROR: This build is using Turbopack, with a \\`webpack\\` config and no \\`turbopack\\` config.\n This may be a mistake.\n\n As of Next.js 16 Turbopack is enabled by default and\n custom webpack configurations may need to be migrated to Turbopack.\n\n NOTE: your \\`webpack\\` config may have been added by a configuration plugin.\n\n To configure Turbopack, see https://nextjs.org/docs/app/api-reference/next-config-js/turbopack\n\n TIP: Many applications work fine under Turbopack with no configuration,\n if that is the case for you, you can silence this error by passing the\n \\`--turbopack\\` or \\`--webpack\\` flag explicitly or simply setting an \n empty turbopack config in ${configFile} (e.g. \\`turbopack: {}\\`).`\n )\n\n process.exit(1)\n }\n\n if (unsupportedConfig.length) {\n unsupportedParts += `\\n\\n- Unsupported Next.js configuration option(s) (${cyan(\n 'next.config.js'\n )})\\n Turbopack will ignore the following configuration options:\\n${unsupportedConfig\n .map((name) => ` - ${red(name)}\\n`)\n .join('')}`\n }\n\n if (unsupportedParts) {\n Log.error(\n `You are using configuration and/or tools that are not yet\\nsupported by Next.js with Turbopack:\\n${unsupportedParts}\\n`\n )\n\n Log.warn(\n 'Learn more about how to configure Turbopack with Next.js:\\n' +\n underline(\n 'https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack'\n )\n )\n }\n\n return rawNextConfig\n}\n"],"names":["loadConfig","Log","unsupportedTurbopackNextConfigOptions","validateTurboNextConfig","dir","configPhase","defaultConfig","require","cyan","red","underline","interopDefault","unsupportedParts","hasWebpackConfig","hasTurboConfig","unsupportedConfig","rawNextConfig","rawConfig","Boolean","webpack","turbopack","flattenKeys","obj","prefix","keys","key","value","pre","length","Array","isArray","concat","push","getDeepValue","split","slice","customKeys","startsWith","isUnsupported","some","unsupportedKey","e","error","process","env","TURBOPACK","configFile","configFileName","exit","map","name","join","warn"],"mappings":"AACA,OAAOA,gBAAgB,mBAAkB;AACzC,YAAYC,SAAS,sBAAqB;AAE1C,MAAMC,wCAAwC;IAC5C,oCAAoC;IACpC,qCAAqC;IACrC,yCAAyC;IACzC,sBAAsB;IACtB,oCAAoC;IACpC,oBAA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C,kBAAkBa,MAAM,EAAE;QAC5BhB,oBAAoB,CAAC,mDAAmD,EAAEJ,KACxE,kBACA,iEAAiE,EAAEO,kBAClEkC,GAAG,CAAC,CAACC,OAAS,CAAC,MAAM,EAAEzC,IAAIyC,MAAM,EAAE,CAAC,EACpCC,IAAI,CAAC,KAAK;IACf;IAEA,IAAIvC,kBAAkB;QACpBX,IAAIyC,KAAK,CACP,CAAC,iGAAiG,EAAE9B,iBAAiB,EAAE,CAAC;QAG1HX,IAAImD,IAAI,CACN,gEACE1C,UACE;IAGR;IAEA,OAAOM;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/diagnosticFormatter.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/diagnosticFormatter.js
new file mode 100644
index 0000000000000000000000000000000000000000..bf6ef8ace3f8d63512cae7b4141d01923c43f69b
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/diagnosticFormatter.js
@@ -0,0 +1,228 @@
+import { codeFrameColumns } from '../../shared/lib/errors/code-frame';
+import { bold, cyan, red, yellow } from '../picocolors';
+import path from 'path';
+function getFormattedLinkDiagnosticMessageText(diagnostic) {
+ const message = diagnostic.messageText;
+ if (typeof message === 'string' && diagnostic.code === 2322) {
+ const match = message.match(/Type '"(.+)"' is not assignable to type 'RouteImpl<.+> \| UrlObject'\./) || message.match(/Type '"(.+)"' is not assignable to type 'UrlObject \| RouteImpl<.+>'\./);
+ if (match) {
+ const [, href] = match;
+ return `"${bold(href)}" is not an existing route. If it is intentional, please type it explicitly with \`as Route\`.`;
+ } else if (message === "Type 'string' is not assignable to type 'UrlObject'.") {
+ var _diagnostic_relatedInformation_, _diagnostic_relatedInformation;
+ const relatedMessage = (_diagnostic_relatedInformation = diagnostic.relatedInformation) == null ? void 0 : (_diagnostic_relatedInformation_ = _diagnostic_relatedInformation[0]) == null ? void 0 : _diagnostic_relatedInformation_.messageText;
+ if (typeof relatedMessage === 'string' && relatedMessage.match(/The expected type comes from property 'href' which is declared here on type 'IntrinsicAttributes & /)) {
+ return `Invalid \`href\` property of \`Link\`: the route does not exist. If it is intentional, please type it explicitly with \`as Route\`.`;
+ }
+ }
+ } else if (typeof message === 'string' && diagnostic.code === 2820) {
+ const match = message.match(/Type '"(.+)"' is not assignable to type 'RouteImpl<.+> \| UrlObject'\. Did you mean '"(.+)"'?/) || message.match(/Type '"(.+)"' is not assignable to type 'UrlObject \| RouteImpl<.+>'\. Did you mean '"(.+)"'?/);
+ if (match) {
+ const [, href, suggestion] = match;
+ return `"${bold(href)}" is not an existing route. Did you mean "${bold(suggestion)}" instead? If it is intentional, please type it explicitly with \`as Route\`.`;
+ }
+ }
+}
+function getFormattedLayoutAndPageDiagnosticMessageText(relativeSourceFilepath, diagnostic) {
+ const message = typeof diagnostic.messageText === 'string' ? diagnostic : diagnostic.messageText;
+ const messageText = message.messageText;
+ if (typeof messageText === 'string') {
+ const type = /page\.[^.]+$/.test(relativeSourceFilepath) ? 'Page' : /route\.[^.]+$/.test(relativeSourceFilepath) ? 'Route' : 'Layout';
+ // Reference of error codes:
+ // https://github.com/Microsoft/TypeScript/blob/main/src/compiler/diagnosticMessages.json
+ switch(message.code){
+ case 2344:
+ const filepathAndType = messageText.match(/typeof import\("(.+)"\)/);
+ if (filepathAndType) {
+ let main = `${type} "${bold(relativeSourceFilepath)}" does not match the required types of a Next.js ${type}.`;
+ function processNext(indent, next) {
+ if (!next) return;
+ for (const item of next){
+ switch(item.code){
+ case 2200:
+ const mismatchedField = item.messageText.match(/The types of '(.+)'/);
+ if (mismatchedField) {
+ main += '\n' + ' '.repeat(indent * 2);
+ main += `"${bold(mismatchedField[1])}" has the wrong type:`;
+ }
+ break;
+ case 2322:
+ const types = item.messageText.match(/Type '(.+)' is not assignable to type '(.+)'./);
+ if (types) {
+ main += '\n' + ' '.repeat(indent * 2);
+ if (types[2] === 'PageComponent' || types[2] === 'LayoutComponent') {
+ main += `The exported ${type} component isn't correctly typed.`;
+ } else {
+ main += `Expected "${bold(types[2].replace('"__invalid_negative_number__"', 'number (>= 0)'))}", got "${bold(types[1])}".`;
+ }
+ }
+ break;
+ case 2326:
+ const invalidConfig = item.messageText.match(/Types of property '(.+)' are incompatible\./);
+ main += '\n' + ' '.repeat(indent * 2);
+ main += `Invalid configuration${invalidConfig ? ` "${bold(invalidConfig[1])}"` : ''}:`;
+ break;
+ case 2530:
+ const invalidField = item.messageText.match(/Property '(.+)' is incompatible with index signature/);
+ if (invalidField) {
+ main += '\n' + ' '.repeat(indent * 2);
+ main += `"${bold(invalidField[1])}" is not a valid ${type} export field.`;
+ }
+ return;
+ case 2739:
+ const invalidProp = item.messageText.match(/Type '(.+)' is missing the following properties from type '(.+)'/);
+ if (invalidProp) {
+ if (invalidProp[1] === 'LayoutProps' || invalidProp[1] === 'PageProps') {
+ main += '\n' + ' '.repeat(indent * 2);
+ main += `Prop "${invalidProp[2]}" is incompatible with the ${type}.`;
+ }
+ }
+ break;
+ case 2559:
+ const invalid = item.messageText.match(/Type '(.+)' has/);
+ if (invalid) {
+ main += '\n' + ' '.repeat(indent * 2);
+ main += `Type "${bold(invalid[1])}" isn't allowed.`;
+ }
+ break;
+ case 2741:
+ const incompatPageProp = item.messageText.match(/Property '(.+)' is missing in type 'PageProps'/);
+ if (incompatPageProp) {
+ main += '\n' + ' '.repeat(indent * 2);
+ main += `Prop "${bold(incompatPageProp[1])}" will never be passed. Remove it from the component's props.`;
+ } else {
+ const extraLayoutProp = item.messageText.match(/Property '(.+)' is missing in type 'LayoutProps' but required in type '(.+)'/);
+ if (extraLayoutProp) {
+ main += '\n' + ' '.repeat(indent * 2);
+ main += `Prop "${bold(extraLayoutProp[1])}" is not valid for this Layout, remove it to fix.`;
+ }
+ }
+ break;
+ default:
+ }
+ processNext(indent + 1, item.next);
+ }
+ }
+ if ('next' in message) processNext(1, message.next);
+ return main;
+ }
+ const invalidExportFnArg = messageText.match(/Type 'OmitWithTag<(.+), .+, "(.+)">' does not satisfy the constraint/);
+ if (invalidExportFnArg) {
+ const main = `${type} "${bold(relativeSourceFilepath)}" has an invalid "${bold(invalidExportFnArg[2])}" export:\n Type "${bold(invalidExportFnArg[1])}" is not valid.`;
+ return main;
+ }
+ function processNextItems(indent, next) {
+ if (!next) return '';
+ let result = '';
+ for (const item of next){
+ switch(item.code){
+ case 2322:
+ const types = item.messageText.match(/Type '(.+)' is not assignable to type '(.+)'./);
+ if (types) {
+ result += '\n' + ' '.repeat(indent * 2);
+ result += `Expected "${bold(types[2])}", got "${bold(types[1])}".`;
+ }
+ break;
+ default:
+ }
+ result += processNextItems(indent + 1, item.next);
+ }
+ return result;
+ }
+ const invalidParamFn = messageText.match(/Type '{ __tag__: (.+); __param_position__: "(.*)"; __param_type__: (.+); }' does not satisfy/);
+ if (invalidParamFn) {
+ let main = `${type} "${bold(relativeSourceFilepath)}" has an invalid ${invalidParamFn[1]} export:\n Type "${bold(invalidParamFn[3])}" is not a valid type for the function's ${invalidParamFn[2]} argument.`;
+ if ('next' in message) main += processNextItems(1, message.next);
+ return main;
+ }
+ const invalidExportFnReturn = messageText.match(/Type '{ __tag__: "(.+)"; __return_type__: (.+); }' does not satisfy/);
+ if (invalidExportFnReturn) {
+ let main = `${type} "${bold(relativeSourceFilepath)}" has an invalid export:\n "${bold(invalidExportFnReturn[2])}" is not a valid ${invalidExportFnReturn[1]} return type:`;
+ if ('next' in message) main += processNextItems(1, message.next);
+ return main;
+ }
+ break;
+ case 2345:
+ const filepathAndInvalidExport = messageText.match(/'typeof import\("(.+)"\)'.+Impossible<"(.+)">/);
+ if (filepathAndInvalidExport) {
+ const main = `${type} "${bold(relativeSourceFilepath)}" exports an invalid "${bold(filepathAndInvalidExport[2])}" field. ${type} should only export a default React component and configuration options. Learn more: https://nextjs.org/docs/messages/invalid-segment-export`;
+ return main;
+ }
+ break;
+ case 2559:
+ const invalid = messageText.match(/Type '(.+)' has no properties in common with type '(.+)'/);
+ if (invalid) {
+ const main = `${type} "${bold(relativeSourceFilepath)}" contains an invalid type "${bold(invalid[1])}" as ${invalid[2]}.`;
+ return main;
+ }
+ break;
+ default:
+ }
+ }
+}
+function getAppEntrySourceFilePath(baseDir, diagnostic) {
+ var _diagnostic_file_text_trim_match, _diagnostic_file;
+ const sourceFilepath = ((_diagnostic_file = diagnostic.file) == null ? void 0 : (_diagnostic_file_text_trim_match = _diagnostic_file.text.trim().match(/^\/\/ File: (.+)\n/)) == null ? void 0 : _diagnostic_file_text_trim_match[1]) || '';
+ return path.relative(baseDir, sourceFilepath);
+}
+export function getFormattedDiagnostic(ts, baseDir, distDir, diagnostic, isAppDirEnabled) {
+ var _diagnostic_file;
+ // If the error comes from .next/types/, we handle it specially.
+ const isLayoutOrPageError = isAppDirEnabled && ((_diagnostic_file = diagnostic.file) == null ? void 0 : _diagnostic_file.fileName.startsWith(path.join(baseDir, distDir, 'types')));
+ let message = '';
+ const appPath = isLayoutOrPageError ? getAppEntrySourceFilePath(baseDir, diagnostic) : null;
+ const linkReason = getFormattedLinkDiagnosticMessageText(diagnostic);
+ const appReason = !linkReason && isLayoutOrPageError && appPath ? getFormattedLayoutAndPageDiagnosticMessageText(appPath, diagnostic) : null;
+ const reason = linkReason || appReason || ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
+ const category = diagnostic.category;
+ switch(category){
+ // Warning
+ case ts.DiagnosticCategory.Warning:
+ {
+ message += yellow(bold('Type warning')) + ': ';
+ break;
+ }
+ // Error
+ case ts.DiagnosticCategory.Error:
+ {
+ message += red(bold('Type error')) + ': ';
+ break;
+ }
+ // 2 = Suggestion, 3 = Message
+ case ts.DiagnosticCategory.Suggestion:
+ case ts.DiagnosticCategory.Message:
+ message += cyan(bold(category === 2 ? 'Suggestion' : 'Info')) + ': ';
+ break;
+ default:
+ {
+ category;
+ }
+ }
+ message += reason + '\n';
+ if (!isLayoutOrPageError && diagnostic.file) {
+ const pos = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
+ const line = pos.line + 1;
+ const character = pos.character + 1;
+ let fileName = path.posix.normalize(path.relative(baseDir, diagnostic.file.fileName).replace(/\\/g, '/'));
+ if (!fileName.startsWith('.')) {
+ fileName = './' + fileName;
+ }
+ message = cyan(fileName) + ':' + yellow(line.toString()) + ':' + yellow(character.toString()) + '\n' + message;
+ const codeFrame = codeFrameColumns(diagnostic.file.getFullText(diagnostic.file.getSourceFile()), {
+ start: {
+ line: line,
+ column: character
+ }
+ }, {
+ color: true
+ });
+ if (codeFrame) {
+ message += '\n' + codeFrame;
+ }
+ } else if (isLayoutOrPageError && appPath) {
+ message = cyan(appPath) + '\n' + message;
+ }
+ return message;
+}
+
+//# sourceMappingURL=diagnosticFormatter.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/diagnosticFormatter.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/diagnosticFormatter.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..394c7e85c684b73d3d5b6c4d745ebedc074ef7ed
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/diagnosticFormatter.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/diagnosticFormatter.ts"],"sourcesContent":["import { codeFrameColumns } from '../../shared/lib/errors/code-frame'\nimport { bold, cyan, red, yellow } from '../picocolors'\nimport path from 'path'\n\nfunction getFormattedLinkDiagnosticMessageText(\n diagnostic: import('typescript').Diagnostic\n) {\n const message = diagnostic.messageText\n if (typeof message === 'string' && diagnostic.code === 2322) {\n const match =\n message.match(\n /Type '\"(.+)\"' is not assignable to type 'RouteImpl<.+> \\| UrlObject'\\./\n ) ||\n message.match(\n /Type '\"(.+)\"' is not assignable to type 'UrlObject \\| RouteImpl<.+>'\\./\n )\n\n if (match) {\n const [, href] = match\n return `\"${bold(\n href\n )}\" is not an existing route. If it is intentional, please type it explicitly with \\`as Route\\`.`\n } else if (\n message === \"Type 'string' is not assignable to type 'UrlObject'.\"\n ) {\n const relatedMessage = diagnostic.relatedInformation?.[0]?.messageText\n if (\n typeof relatedMessage === 'string' &&\n relatedMessage.match(\n /The expected type comes from property 'href' which is declared here on type 'IntrinsicAttributes & /\n )\n ) {\n return `Invalid \\`href\\` property of \\`Link\\`: the route does not exist. If it is intentional, please type it explicitly with \\`as Route\\`.`\n }\n }\n } else if (typeof message === 'string' && diagnostic.code === 2820) {\n const match =\n message.match(\n /Type '\"(.+)\"' is not assignable to type 'RouteImpl<.+> \\| UrlObject'\\. Did you mean '\"(.+)\"'?/\n ) ||\n message.match(\n /Type '\"(.+)\"' is not assignable to type 'UrlObject \\| RouteImpl<.+>'\\. Did you mean '\"(.+)\"'?/\n )\n\n if (match) {\n const [, href, suggestion] = match\n return `\"${bold(href)}\" is not an existing route. Did you mean \"${bold(\n suggestion\n )}\" instead? If it is intentional, please type it explicitly with \\`as Route\\`.`\n }\n }\n}\n\nfunction getFormattedLayoutAndPageDiagnosticMessageText(\n relativeSourceFilepath: string,\n diagnostic: import('typescript').Diagnostic\n) {\n const message =\n typeof diagnostic.messageText === 'string'\n ? diagnostic\n : diagnostic.messageText\n const messageText = message.messageText\n\n if (typeof messageText === 'string') {\n const type = /page\\.[^.]+$/.test(relativeSourceFilepath)\n ? 'Page'\n : /route\\.[^.]+$/.test(relativeSourceFilepath)\n ? 'Route'\n : 'Layout'\n\n // Reference of error codes:\n // https://github.com/Microsoft/TypeScript/blob/main/src/compiler/diagnosticMessages.json\n switch (message.code) {\n case 2344:\n const filepathAndType = messageText.match(/typeof import\\(\"(.+)\"\\)/)\n if (filepathAndType) {\n let main = `${type} \"${bold(\n relativeSourceFilepath\n )}\" does not match the required types of a Next.js ${type}.`\n\n function processNext(\n indent: number,\n next?: import('typescript').DiagnosticMessageChain[]\n ) {\n if (!next) return\n\n for (const item of next) {\n switch (item.code) {\n case 2200:\n const mismatchedField =\n item.messageText.match(/The types of '(.+)'/)\n if (mismatchedField) {\n main += '\\n' + ' '.repeat(indent * 2)\n main += `\"${bold(mismatchedField[1])}\" has the wrong type:`\n }\n break\n case 2322:\n const types = item.messageText.match(\n /Type '(.+)' is not assignable to type '(.+)'./\n )\n if (types) {\n main += '\\n' + ' '.repeat(indent * 2)\n\n if (\n types[2] === 'PageComponent' ||\n types[2] === 'LayoutComponent'\n ) {\n main += `The exported ${type} component isn't correctly typed.`\n } else {\n main += `Expected \"${bold(\n types[2].replace(\n '\"__invalid_negative_number__\"',\n 'number (>= 0)'\n )\n )}\", got \"${bold(types[1])}\".`\n }\n }\n break\n case 2326:\n const invalidConfig = item.messageText.match(\n /Types of property '(.+)' are incompatible\\./\n )\n main += '\\n' + ' '.repeat(indent * 2)\n main += `Invalid configuration${\n invalidConfig ? ` \"${bold(invalidConfig[1])}\"` : ''\n }:`\n break\n case 2530:\n const invalidField = item.messageText.match(\n /Property '(.+)' is incompatible with index signature/\n )\n if (invalidField) {\n main += '\\n' + ' '.repeat(indent * 2)\n main += `\"${bold(\n invalidField[1]\n )}\" is not a valid ${type} export field.`\n }\n return\n case 2739:\n const invalidProp = item.messageText.match(\n /Type '(.+)' is missing the following properties from type '(.+)'/\n )\n if (invalidProp) {\n if (\n invalidProp[1] === 'LayoutProps' ||\n invalidProp[1] === 'PageProps'\n ) {\n main += '\\n' + ' '.repeat(indent * 2)\n main += `Prop \"${invalidProp[2]}\" is incompatible with the ${type}.`\n }\n }\n break\n case 2559:\n const invalid = item.messageText.match(/Type '(.+)' has/)\n if (invalid) {\n main += '\\n' + ' '.repeat(indent * 2)\n main += `Type \"${bold(invalid[1])}\" isn't allowed.`\n }\n break\n case 2741:\n const incompatPageProp = item.messageText.match(\n /Property '(.+)' is missing in type 'PageProps'/\n )\n if (incompatPageProp) {\n main += '\\n' + ' '.repeat(indent * 2)\n main += `Prop \"${bold(\n incompatPageProp[1]\n )}\" will never be passed. Remove it from the component's props.`\n } else {\n const extraLayoutProp = item.messageText.match(\n /Property '(.+)' is missing in type 'LayoutProps' but required in type '(.+)'/\n )\n if (extraLayoutProp) {\n main += '\\n' + ' '.repeat(indent * 2)\n main += `Prop \"${bold(\n extraLayoutProp[1]\n )}\" is not valid for this Layout, remove it to fix.`\n }\n }\n break\n default:\n }\n\n processNext(indent + 1, item.next)\n }\n }\n\n if ('next' in message) processNext(1, message.next)\n return main\n }\n\n const invalidExportFnArg = messageText.match(\n /Type 'OmitWithTag<(.+), .+, \"(.+)\">' does not satisfy the constraint/\n )\n if (invalidExportFnArg) {\n const main = `${type} \"${bold(\n relativeSourceFilepath\n )}\" has an invalid \"${bold(\n invalidExportFnArg[2]\n )}\" export:\\n Type \"${bold(invalidExportFnArg[1])}\" is not valid.`\n return main\n }\n\n function processNextItems(\n indent: number,\n next?: import('typescript').DiagnosticMessageChain[]\n ) {\n if (!next) return ''\n\n let result = ''\n\n for (const item of next) {\n switch (item.code) {\n case 2322:\n const types = item.messageText.match(\n /Type '(.+)' is not assignable to type '(.+)'./\n )\n if (types) {\n result += '\\n' + ' '.repeat(indent * 2)\n result += `Expected \"${bold(types[2])}\", got \"${bold(\n types[1]\n )}\".`\n }\n break\n default:\n }\n\n result += processNextItems(indent + 1, item.next)\n }\n\n return result\n }\n\n const invalidParamFn = messageText.match(\n /Type '{ __tag__: (.+); __param_position__: \"(.*)\"; __param_type__: (.+); }' does not satisfy/\n )\n if (invalidParamFn) {\n let main = `${type} \"${bold(\n relativeSourceFilepath\n )}\" has an invalid ${invalidParamFn[1]} export:\\n Type \"${bold(\n invalidParamFn[3]\n )}\" is not a valid type for the function's ${\n invalidParamFn[2]\n } argument.`\n\n if ('next' in message) main += processNextItems(1, message.next)\n return main\n }\n\n const invalidExportFnReturn = messageText.match(\n /Type '{ __tag__: \"(.+)\"; __return_type__: (.+); }' does not satisfy/\n )\n if (invalidExportFnReturn) {\n let main = `${type} \"${bold(\n relativeSourceFilepath\n )}\" has an invalid export:\\n \"${bold(\n invalidExportFnReturn[2]\n )}\" is not a valid ${invalidExportFnReturn[1]} return type:`\n\n if ('next' in message) main += processNextItems(1, message.next)\n return main\n }\n\n break\n case 2345:\n const filepathAndInvalidExport = messageText.match(\n /'typeof import\\(\"(.+)\"\\)'.+Impossible<\"(.+)\">/\n )\n if (filepathAndInvalidExport) {\n const main = `${type} \"${bold(\n relativeSourceFilepath\n )}\" exports an invalid \"${bold(\n filepathAndInvalidExport[2]\n )}\" field. ${type} should only export a default React component and configuration options. Learn more: https://nextjs.org/docs/messages/invalid-segment-export`\n return main\n }\n break\n case 2559:\n const invalid = messageText.match(\n /Type '(.+)' has no properties in common with type '(.+)'/\n )\n if (invalid) {\n const main = `${type} \"${bold(\n relativeSourceFilepath\n )}\" contains an invalid type \"${bold(invalid[1])}\" as ${invalid[2]}.`\n return main\n }\n break\n default:\n }\n }\n}\n\nfunction getAppEntrySourceFilePath(\n baseDir: string,\n diagnostic: import('typescript').Diagnostic\n) {\n const sourceFilepath =\n diagnostic.file?.text.trim().match(/^\\/\\/ File: (.+)\\n/)?.[1] || ''\n\n return path.relative(baseDir, sourceFilepath)\n}\n\nexport function getFormattedDiagnostic(\n ts: typeof import('typescript'),\n baseDir: string,\n distDir: string,\n diagnostic: import('typescript').Diagnostic,\n isAppDirEnabled?: boolean\n): string {\n // If the error comes from .next/types/, we handle it specially.\n const isLayoutOrPageError =\n isAppDirEnabled &&\n diagnostic.file?.fileName.startsWith(path.join(baseDir, distDir, 'types'))\n\n let message = ''\n\n const appPath = isLayoutOrPageError\n ? getAppEntrySourceFilePath(baseDir, diagnostic)\n : null\n const linkReason = getFormattedLinkDiagnosticMessageText(diagnostic)\n const appReason =\n !linkReason && isLayoutOrPageError && appPath\n ? getFormattedLayoutAndPageDiagnosticMessageText(appPath, diagnostic)\n : null\n\n const reason =\n linkReason ||\n appReason ||\n ts.flattenDiagnosticMessageText(diagnostic.messageText, '\\n')\n const category = diagnostic.category\n switch (category) {\n // Warning\n case ts.DiagnosticCategory.Warning: {\n message += yellow(bold('Type warning')) + ': '\n break\n }\n // Error\n case ts.DiagnosticCategory.Error: {\n message += red(bold('Type error')) + ': '\n break\n }\n // 2 = Suggestion, 3 = Message\n case ts.DiagnosticCategory.Suggestion:\n case ts.DiagnosticCategory.Message:\n message += cyan(bold(category === 2 ? 'Suggestion' : 'Info')) + ': '\n break\n default: {\n category satisfies never\n }\n }\n\n message += reason + '\\n'\n\n if (!isLayoutOrPageError && diagnostic.file) {\n const pos = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!)\n const line = pos.line + 1\n const character = pos.character + 1\n\n let fileName = path.posix.normalize(\n path.relative(baseDir, diagnostic.file.fileName).replace(/\\\\/g, '/')\n )\n if (!fileName.startsWith('.')) {\n fileName = './' + fileName\n }\n\n message =\n cyan(fileName) +\n ':' +\n yellow(line.toString()) +\n ':' +\n yellow(character.toString()) +\n '\\n' +\n message\n\n const codeFrame = codeFrameColumns(\n diagnostic.file.getFullText(diagnostic.file.getSourceFile()),\n {\n start: { line: line, column: character },\n },\n { color: true }\n )\n if (codeFrame) {\n message += '\\n' + codeFrame\n }\n } else if (isLayoutOrPageError && appPath) {\n message = cyan(appPath) + '\\n' + message\n }\n\n return message\n}\n"],"names":["codeFrameColumns","bold","cyan","red","yellow","path","getFormattedLinkDiagnosticMessageText","diagnostic","message","messageText","code","match","href","relatedMessage","relatedInformation","suggestion","getFormattedLayoutAndPageDiagnosticMessageText","relativeSourceFilepath","type","test","filepathAndType","main","processNext","indent","next","item","mismatchedField","repeat","types","replace","invalidConfig","invalidField","invalidProp","invalid","incompatPageProp","extraLayoutProp","invalidExportFnArg","processNextItems","result","invalidParamFn","invalidExportFnReturn","filepathAndInvalidExport","getAppEntrySourceFilePath","baseDir","sourceFilepath","file","text","trim","relative","getFormattedDiagnostic","ts","distDir","isAppDirEnabled","isLayoutOrPageError","fileName","startsWith","join","appPath","linkReason","appReason","reason","flattenDiagnosticMessageText","category","DiagnosticCategory","Warning","Error","Suggestion","Message","pos","getLineAndCharacterOfPosition","start","line","character","posix","normalize","toString","codeFrame","getFullText","getSourceFile","column","color"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qCAAoC;AACrE,SAASC,IAA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AAS,GAAG;QAElC,IAAIlB,WAAWjD,KAAKoE,KAAK,CAACC,SAAS,CACjCrE,KAAK2C,QAAQ,CAACL,SAASpC,WAAWsC,IAAI,CAACS,QAAQ,EAAEzB,OAAO,CAAC,OAAO;QAElE,IAAI,CAACyB,SAASC,UAAU,CAAC,MAAM;YAC7BD,WAAW,OAAOA;QACpB;QAEA9C,UACEN,KAAKoD,YACL,MACAlD,OAAOmE,KAAKI,QAAQ,MACpB,MACAvE,OAAOoE,UAAUG,QAAQ,MACzB,OACAnE;QAEF,MAAMoE,YAAY5E,iBAChBO,WAAWsC,IAAI,CAACgC,WAAW,CAACtE,WAAWsC,IAAI,CAACiC,aAAa,KACzD;YACER,OAAO;gBAAEC,MAAMA;gBAAMQ,QAAQP;YAAU;QACzC,GACA;YAAEQ,OAAO;QAAK;QAEhB,IAAIJ,WAAW;YACbpE,WAAW,OAAOoE;QACpB;IACF,OAAO,IAAIvB,uBAAuBI,SAAS;QACzCjD,UAAUN,KAAKuD,WAAW,OAAOjD;IACnC;IAEA,OAAOA;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptConfiguration.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptConfiguration.js
new file mode 100644
index 0000000000000000000000000000000000000000..a09344e280cbd12aa5a5def13d53844bf8369265
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptConfiguration.js
@@ -0,0 +1,46 @@
+import { bold, cyan } from '../picocolors';
+import os from 'os';
+import path from 'path';
+import isError from '../is-error';
+export async function getTypeScriptConfiguration(typescript, tsConfigPath, metaOnly) {
+ try {
+ var _result_errors;
+ const formatDiagnosticsHost = {
+ getCanonicalFileName: (fileName)=>fileName,
+ getCurrentDirectory: typescript.sys.getCurrentDirectory,
+ getNewLine: ()=>os.EOL
+ };
+ const { config, error } = typescript.readConfigFile(tsConfigPath, typescript.sys.readFile);
+ if (error) {
+ throw new Error(typescript.formatDiagnostic(error, formatDiagnosticsHost));
+ }
+ let configToParse = config;
+ const result = typescript.parseJsonConfigFileContent(configToParse, // When only interested in meta info,
+ // avoid enumerating all files (for performance reasons)
+ metaOnly ? {
+ ...typescript.sys,
+ readDirectory (_path, extensions, _excludes, _includes, _depth) {
+ return [
+ extensions ? `file${extensions[0]}` : `file.ts`
+ ];
+ }
+ } : typescript.sys, path.dirname(tsConfigPath));
+ if (result.errors) {
+ result.errors = result.errors.filter(({ code })=>// No inputs were found in config file
+ code !== 18003);
+ }
+ if ((_result_errors = result.errors) == null ? void 0 : _result_errors.length) {
+ // TODO: Throw AggregateError for all diagnostics.
+ throw new Error(typescript.formatDiagnostic(result.errors[0], formatDiagnosticsHost));
+ }
+ return result;
+ } catch (err) {
+ if (isError(err) && err.name === 'SyntaxError') {
+ const reason = '\n' + (err.message ?? '');
+ throw new Error(bold('Could not parse' + cyan('tsconfig.json') + '.' + ' Please make sure it contains syntactically correct JSON.') + reason);
+ }
+ throw err;
+ }
+}
+
+//# sourceMappingURL=getTypeScriptConfiguration.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptConfiguration.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptConfiguration.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..804c4f86b124b1aa748e29915f77549c8b6d8303
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptConfiguration.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/getTypeScriptConfiguration.ts"],"sourcesContent":["import { bold, cyan } from '../picocolors'\nimport os from 'os'\nimport path from 'path'\n\nimport isError from '../is-error'\n\nexport async function getTypeScriptConfiguration(\n typescript: typeof import('typescript'),\n tsConfigPath: string,\n metaOnly?: boolean\n): Promise {\n try {\n const formatDiagnosticsHost: import('typescript').FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName: string) => fileName,\n getCurrentDirectory: typescript.sys.getCurrentDirectory,\n getNewLine: () => os.EOL,\n }\n\n const { config, error } = typescript.readConfigFile(\n tsConfigPath,\n typescript.sys.readFile\n )\n if (error) {\n throw new Error(typescript.formatDiagnostic(error, formatDiagnosticsHost))\n }\n\n let configToParse: any = config\n\n const result = typescript.parseJsonConfigFileContent(\n configToParse,\n // When only interested in meta info,\n // avoid enumerating all files (for performance reasons)\n metaOnly\n ? {\n ...typescript.sys,\n readDirectory(_path, extensions, _excludes, _includes, _depth) {\n return [extensions ? `file${extensions[0]}` : `file.ts`]\n },\n }\n : typescript.sys,\n path.dirname(tsConfigPath)\n )\n\n if (result.errors) {\n result.errors = result.errors.filter(\n ({ code }) =>\n // No inputs were found in config file\n code !== 18003\n )\n }\n\n if (result.errors?.length) {\n // TODO: Throw AggregateError for all diagnostics.\n throw new Error(\n typescript.formatDiagnostic(result.errors[0], formatDiagnosticsHost)\n )\n }\n\n return result\n } catch (err) {\n if (isError(err) && err.name === 'SyntaxError') {\n const reason = '\\n' + (err.message ?? '')\n throw new Error(\n bold(\n 'Could not parse' +\n cyan('tsconfig.json') +\n '.' +\n ' Please make sure it contains syntactically correct JSON.'\n ) + reason\n )\n }\n throw err\n }\n}\n"],"names":["bold","cyan","os","path","isError","getTypeScriptConfiguration","typescript","tsConfigPath","metaOnly","result","formatDiagnosticsHost","getCanonicalFileName","fileName","getCurrentDirectory","sys","getNewLine","EOL","config","error","readConfigFile","readFile","Error","formatDiagnostic","configToParse","parseJsonConfigFileContent","readDirectory","_path","extensions","_excludes","_includes","_depth","dirname","errors","filter","code","length","err","name","reason","message"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,QAAQ,gBAAe;AAC1C,OAAOC,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AAEvB,OAAOC,aAAa,cAAa;AAEjC,OAAO,eAAeC,2BACpBC,UAAuC,EACvCC,YAAoB,EACpBC,QAAkB;IAElB,IAAI;YAwCEC;QAvCJ,MAAMC,wBAAoE;YAC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MAAMF;IACR;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptIntent.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptIntent.js
new file mode 100644
index 0000000000000000000000000000000000000000..a70334695a66eb1ace4dacc15082c330b01ebc22
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptIntent.js
@@ -0,0 +1,37 @@
+import { existsSync, readFileSync } from 'fs';
+import path from 'path';
+import { recursiveReadDir } from '../recursive-readdir';
+export async function getTypeScriptIntent(baseDir, intentDirs, tsconfigPath) {
+ const resolvedTsConfigPath = path.join(baseDir, tsconfigPath);
+ // The integration turns on if we find a `tsconfig.json` in the user's
+ // project.
+ const hasTypeScriptConfiguration = existsSync(resolvedTsConfigPath);
+ if (hasTypeScriptConfiguration) {
+ const content = readFileSync(resolvedTsConfigPath, {
+ encoding: 'utf8'
+ }).trim();
+ return {
+ firstTimeSetup: content === '' || content === '{}'
+ };
+ }
+ // Next.js also offers a friendly setup mode that bootstraps a TypeScript
+ // project for the user when we detect TypeScript files. So, we need to check
+ // the `pages/` directory for a TypeScript file.
+ // Checking all directories is too slow, so this is a happy medium.
+ const tsFilesRegex = /.*\.(ts|tsx)$/;
+ const excludedRegex = /(node_modules|.*\.d\.ts$)/;
+ for (const dir of intentDirs){
+ const typescriptFiles = await recursiveReadDir(dir, {
+ pathnameFilter: (name)=>tsFilesRegex.test(name),
+ ignoreFilter: (name)=>excludedRegex.test(name)
+ });
+ if (typescriptFiles.length) {
+ return {
+ firstTimeSetup: true
+ };
+ }
+ }
+ return false;
+}
+
+//# sourceMappingURL=getTypeScriptIntent.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptIntent.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptIntent.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..c451e236b71ebbc27df6c414b7afdc3b4b0c70ae
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/getTypeScriptIntent.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/getTypeScriptIntent.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs'\nimport path from 'path'\nimport { recursiveReadDir } from '../recursive-readdir'\n\nexport type TypeScriptIntent = { firstTimeSetup: boolean }\n\nexport async function getTypeScriptIntent(\n baseDir: string,\n intentDirs: string[],\n tsconfigPath: string\n): Promise {\n const resolvedTsConfigPath = path.join(baseDir, tsconfigPath)\n\n // The integration turns on if we find a `tsconfig.json` in the user's\n // project.\n const hasTypeScriptConfiguration = existsSync(resolvedTsConfigPath)\n if (hasTypeScriptConfiguration) {\n const content = readFileSync(resolvedTsConfigPath, {\n encoding: 'utf8',\n }).trim()\n\n return { firstTimeSetup: content === '' || content === '{}' }\n }\n\n // Next.js also offers a friendly setup mode that bootstraps a TypeScript\n // project for the user when we detect TypeScript files. So, we need to check\n // the `pages/` directory for a TypeScript file.\n // Checking all directories is too slow, so this is a happy medium.\n const tsFilesRegex = /.*\\.(ts|tsx)$/\n const excludedRegex = /(node_modules|.*\\.d\\.ts$)/\n for (const dir of intentDirs) {\n const typescriptFiles = await recursiveReadDir(dir, {\n pathnameFilter: (name) => tsFilesRegex.test(name),\n ignoreFilter: (name) => excludedRegex.test(name),\n })\n if (typescriptFiles.length) {\n return { firstTimeSetup: true }\n }\n }\n\n return false\n}\n"],"names":["existsSync","readFileSync","path","recursiveReadDir","getTypeScriptIntent","baseDir","intentDirs","tsconfigPath","resolvedTsConfigPath","join","hasTypeScriptConfiguration","content","encoding","trim","firstTimeSetup","tsFilesRegex","excludedRegex","dir","typescriptFiles","pathnameFilter","name","test","ignoreFilter","length"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,KAAI;AAC7C,OAAOC,UAAU,OAAM;AACvB,SAASC,gBAAgB,QAAQ,uBAAsB;AAIvD,OAAO,eAAeC,oBACpBC,OAAe,EACfC,UAAoB,EACpBC,YAAoB;IAEpB,MAAMC,uBAAuBN,KAAKO,IAAI,CAACJ,SAASE;IAEhD,sEAAsE;IACtE,WAAW;IACX,MAAMG,6BAA6BV,WAAWQ;IAC9C,IAAIE,4BAA4B;QAC9B,MAAMC,UAAUV,aAAaO,sBAAsB;YACjDI,UAAU;QACZ,GAAGC,IAAI;QAEP,OAAO;YAAEC,gBAAgBH,YAAY,MAAMA,YAAY;QAAK;IAC9D;IAEA,yEAAyE;IACzE,6EAA6E;IAC7E,gDAAgD;IAChD,mEAAmE;IACnE,MAAMI,eAAe;IACrB,MAAMC,gBAAgB;IACtB,KAAK,MAAMC,OAAOX,WAAY;QAC5B,MAAMY,kBAAkB,MAAMf,iBAAiBc,KAAK;YAClDE,gBAAgB,CAACC,OAASL,aAAaM,IAAI,CAACD;YAC5CE,cAAc,CAACF,OAASJ,cAAcK,IAAI,CAACD;QAC7C;QACA,IAAIF,gBAAgBK,MAAM,EAAE;YAC1B,OAAO;gBAAET,gBAAgB;YAAK;QAChC;IACF;IAEA,OAAO;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/loadTsConfig.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/loadTsConfig.js
new file mode 100644
index 0000000000000000000000000000000000000000..a3b09aff56a68b994c16a0c116ea13e329a53e83
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/loadTsConfig.js
@@ -0,0 +1,129 @@
+import { existsSync, readFileSync, statSync } from 'node:fs';
+import path from 'node:path';
+import * as CommentJson from 'next/dist/compiled/comment-json';
+function resolveConfigDirValue(value, configDir, rootConfigDir) {
+ return path.resolve(configDir, value.replace(/\$\{configDir\}/g, rootConfigDir));
+}
+function resolveConfigFile(candidate) {
+ for (const configPath of [
+ candidate,
+ candidate.endsWith('.json') ? undefined : candidate + '.json'
+ ]){
+ if (configPath && existsSync(configPath) && statSync(configPath).isFile()) {
+ return configPath;
+ }
+ }
+}
+function resolvePackageTsConfig(extendsPath, currentConfigDir) {
+ const parts = extendsPath.split('/');
+ const isPackageRoot = extendsPath.startsWith('@') ? parts.length === 2 : parts.length === 1;
+ if (!isPackageRoot) {
+ return undefined;
+ }
+ try {
+ const packageJsonPath = require.resolve(extendsPath + '/package.json', {
+ paths: [
+ currentConfigDir
+ ]
+ });
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
+ if (packageJson.exports !== undefined) {
+ try {
+ const exportedConfig = require.resolve(extendsPath, {
+ paths: [
+ currentConfigDir
+ ]
+ });
+ if (path.extname(exportedConfig) === '.json') {
+ return exportedConfig;
+ }
+ } catch {}
+ }
+ if (typeof packageJson.tsconfig === 'string') {
+ return resolveConfigFile(path.resolve(path.dirname(packageJsonPath), packageJson.tsconfig));
+ }
+ return resolveConfigFile(path.join(path.dirname(packageJsonPath), 'tsconfig'));
+ } catch {}
+}
+function resolveExtends(extendsPath, currentConfigDir) {
+ if (extendsPath.startsWith('./') || extendsPath.startsWith('../') || path.isAbsolute(extendsPath)) {
+ const resolved = path.resolve(currentConfigDir, extendsPath);
+ if (existsSync(resolved)) {
+ return resolved;
+ }
+ if (!resolved.endsWith('.json') && existsSync(resolved + '.json')) {
+ return resolved + '.json';
+ }
+ return resolved;
+ }
+ const packageConfigPath = resolvePackageTsConfig(extendsPath, currentConfigDir);
+ if (packageConfigPath) {
+ return packageConfigPath;
+ }
+ try {
+ const resolved = require.resolve(extendsPath, {
+ paths: [
+ currentConfigDir
+ ]
+ });
+ if (path.extname(resolved) === '.json') {
+ return resolved;
+ }
+ } catch {}
+ try {
+ return require.resolve(extendsPath + '/tsconfig.json', {
+ paths: [
+ currentConfigDir
+ ]
+ });
+ } catch {
+ return path.resolve(currentConfigDir, extendsPath);
+ }
+}
+function loadTsConfigOptionsRecursive(configPath, visited, rootConfigDir) {
+ const resolvedPath = path.resolve(configPath);
+ if (visited.has(resolvedPath) || !existsSync(resolvedPath)) {
+ return {};
+ }
+ const nextVisited = new Set(visited);
+ nextVisited.add(resolvedPath);
+ const configContent = readFileSync(resolvedPath, 'utf8');
+ const config = CommentJson.parse(configContent);
+ const configDir = path.dirname(resolvedPath);
+ let mergedOptions = {};
+ if (config.extends) {
+ const extendsList = Array.isArray(config.extends) ? config.extends : [
+ config.extends
+ ];
+ for (const extendsPath of extendsList){
+ const parentConfigPath = resolveExtends(extendsPath, configDir);
+ const parentOptions = loadTsConfigOptionsRecursive(parentConfigPath, nextVisited, rootConfigDir);
+ mergedOptions = {
+ ...mergedOptions,
+ ...parentOptions
+ };
+ }
+ }
+ const currentOptions = config.compilerOptions ?? {};
+ if (Object.hasOwn(currentOptions, 'paths')) {
+ mergedOptions.paths = currentOptions.paths;
+ mergedOptions.pathsBasePath = configDir;
+ }
+ if (Object.hasOwn(currentOptions, 'baseUrl') && typeof currentOptions.baseUrl === 'string') {
+ mergedOptions.baseUrl = resolveConfigDirValue(currentOptions.baseUrl, configDir, rootConfigDir);
+ }
+ if (mergedOptions.baseUrl) {
+ mergedOptions.pathsBasePath = undefined;
+ }
+ return mergedOptions;
+}
+/**
+ * Loads only the tsconfig options Next.js needs outside of the TypeScript API.
+ * Paths and baseUrl keep the directory they were declared in while resolving
+ * an extends chain, including arrays of extended configs.
+ */ export function loadTsConfigOptions(configPath) {
+ const resolvedPath = path.resolve(configPath);
+ return loadTsConfigOptionsRecursive(resolvedPath, new Set(), path.dirname(resolvedPath));
+}
+
+//# sourceMappingURL=loadTsConfig.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/loadTsConfig.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/loadTsConfig.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..8ae5221c1bfd079b88b214268ebad89790dbe530
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/loadTsConfig.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/loadTsConfig.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from 'node:fs'\nimport path from 'node:path'\n\nimport * as CommentJson from 'next/dist/compiled/comment-json'\n\nexport type RelevantCompilerOptions = {\n paths?: Record\n /** Absolute path for an explicitly configured baseUrl. */\n baseUrl?: string\n /** Absolute directory containing an inherited paths option without baseUrl. */\n pathsBasePath?: string\n}\n\nfunction resolveConfigDirValue(\n value: string,\n configDir: string,\n rootConfigDir: string\n): string {\n return path.resolve(\n configDir,\n value.replace(/\\$\\{configDir\\}/g, rootConfigDir)\n )\n}\n\nfunction resolveConfigFile(candidate: string): string | undefined {\n for (const configPath of [\n candidate,\n candidate.endsWith('.json') ? undefined : candidate + '.json',\n ]) {\n if (configPath && existsSync(configPath) && statSync(configPath).isFile()) {\n return configPath\n }\n }\n}\n\nfunction resolvePackageTsConfig(\n extendsPath: string,\n currentConfigDir: string\n): string | undefined {\n const parts = extendsPath.split('/')\n const isPackageRoot = extendsPath.startsWith('@')\n ? parts.length === 2\n : parts.length === 1\n\n if (!isPackageRoot) {\n return undefined\n }\n\n try {\n const packageJsonPath = require.resolve(extendsPath + '/package.json', {\n paths: [currentConfigDir],\n })\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))\n if (packageJson.exports !== undefined) {\n try {\n const exportedConfig = require.resolve(extendsPath, {\n paths: [currentConfigDir],\n })\n if (path.extname(exportedConfig) === '.json') {\n return exportedConfig\n }\n } catch {}\n }\n if (typeof packageJson.tsconfig === 'string') {\n return resolveConfigFile(\n path.resolve(path.dirname(packageJsonPath), packageJson.tsconfig)\n )\n }\n return resolveConfigFile(\n path.join(path.dirname(packageJsonPath), 'tsconfig')\n )\n } catch {}\n}\n\nfunction resolveExtends(extendsPath: string, currentConfigDir: string): string {\n if (\n extendsPath.startsWith('./') ||\n extendsPath.startsWith('../') ||\n path.isAbsolute(extendsPath)\n ) {\n const resolved = path.resolve(currentConfigDir, extendsPath)\n if (existsSync(resolved)) {\n return resolved\n }\n if (!resolved.endsWith('.json') && existsSync(resolved + '.json')) {\n return resolved + '.json'\n }\n return resolved\n }\n\n const packageConfigPath = resolvePackageTsConfig(\n extendsPath,\n currentConfigDir\n )\n if (packageConfigPath) {\n return packageConfigPath\n }\n\n try {\n const resolved = require.resolve(extendsPath, { paths: [currentConfigDir] })\n if (path.extname(resolved) === '.json') {\n return resolved\n }\n } catch {}\n\n try {\n return require.resolve(extendsPath + '/tsconfig.json', {\n paths: [currentConfigDir],\n })\n } catch {\n return path.resolve(currentConfigDir, extendsPath)\n }\n}\n\nfunction loadTsConfigOptionsRecursive(\n configPath: string,\n visited: Set,\n rootConfigDir: string\n): RelevantCompilerOptions {\n const resolvedPath = path.resolve(configPath)\n\n if (visited.has(resolvedPath) || !existsSync(resolvedPath)) {\n return {}\n }\n\n const nextVisited = new Set(visited)\n nextVisited.add(resolvedPath)\n\n const configContent = readFileSync(resolvedPath, 'utf8')\n const config = CommentJson.parse(configContent)\n const configDir = path.dirname(resolvedPath)\n\n let mergedOptions: RelevantCompilerOptions = {}\n\n if (config.extends) {\n const extendsList = Array.isArray(config.extends)\n ? config.extends\n : [config.extends]\n\n for (const extendsPath of extendsList) {\n const parentConfigPath = resolveExtends(extendsPath, configDir)\n const parentOptions = loadTsConfigOptionsRecursive(\n parentConfigPath,\n nextVisited,\n rootConfigDir\n )\n mergedOptions = { ...mergedOptions, ...parentOptions }\n }\n }\n\n const currentOptions = config.compilerOptions ?? {}\n\n if (Object.hasOwn(currentOptions, 'paths')) {\n mergedOptions.paths = currentOptions.paths\n mergedOptions.pathsBasePath = configDir\n }\n\n if (\n Object.hasOwn(currentOptions, 'baseUrl') &&\n typeof currentOptions.baseUrl === 'string'\n ) {\n mergedOptions.baseUrl = resolveConfigDirValue(\n currentOptions.baseUrl,\n configDir,\n rootConfigDir\n )\n }\n\n if (mergedOptions.baseUrl) {\n mergedOptions.pathsBasePath = undefined\n }\n\n return mergedOptions\n}\n\n/**\n * Loads only the tsconfig options Next.js needs outside of the TypeScript API.\n * Paths and baseUrl keep the directory they were declared in while resolving\n * an extends chain, including arrays of extended configs.\n */\nexport function loadTsConfigOptions(\n configPath: string\n): RelevantCompilerOptions {\n const resolvedPath = path.resolve(configPath)\n return loadTsConfigOptionsRecursive(\n resolvedPath,\n new Set(),\n path.dirname(resolvedPath)\n )\n}\n"],"names":["existsSync","readFileSync","statSync","path","CommentJson","resolveConfigDirValue","value","configDir","rootConfigDir","resolve","replace","resolveConfigFile","candidate","configPath","endsWith","undefined","isFile","resolvePackageTsConfig","extendsPath","currentConfigDir","parts","split","isPackageRoot","startsWith","length","packageJsonPath","require","paths","packageJson","JSON","parse","exports","exportedConfig","extname","tsconfig","dirname","join","resolveExtends","isAbsolute","resolved","packageConfigPath","loadTsConfigOptionsRecursive","visited","resolvedPath","has","nextVisited","Set","add","configContent","config","mergedOptions","extends","extendsList","Array","isArray","parentConfigPath","parentOptions","currentOptions","compilerOptions","Object","hasOwn","pathsBasePath","baseUrl","loadTsConfigOptions"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,UAAS;AAC5D,OAAOC,UAAU,YAAW;AAE5B,YAAYC,iBAAiB,kCAAiC;AAU9D,SAASC,sBACPC,KAAa,EACbC,SAAiB,EACjBC,aAAqB;IAErB,OAAOL,KAAKM,OAAO,CACjBF,WACAD,MAAMI,OAAO,CAAC,oBAAoBF;AAEtC;AAEA,SAASG,kBAAkBC,SAAiB;IAC1C,KAAK,MAAMC,cAAc;QACvBD;QACAA,UAAUE,QAAQ,CAAC,WAAWC,YAAYH,YAAY;KACvD,CAAE;QACD,IAAIC,cAAcb,WAAWa,eAAeX,SAASW,YAAYG,MAAM,IAAI;YACzE,OAAOH;QACT;IACF;AACF;AAEA,SAASI,uBACPC,WAAmB,EACnBC,gBAAwB;IAExB,MAAMC,QAAQF,YAAYG,KAAK,CAAC;IAChC,MAAMC,gBAAgBJ,YAAYK,UAAU,CAAC,OACzCH,MAAMI,MAAM,KAAK,IACjBJ,MAAMI,MAAM,KAAK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GAAGzD,sBACtBoD,eAAeK,OAAO,EACtBvD,WACAC;IAEJ;IAEA,IAAI0C,cAAcY,OAAO,EAAE;QACzBZ,cAAcW,aAAa,GAAG9C;IAChC;IAEA,OAAOmC;AACT;AAEA;;;;CAIC,GACD,OAAO,SAASa,oBACdlD,UAAkB;IAElB,MAAM8B,eAAexC,KAAKM,OAAO,CAACI;IAClC,OAAO4B,6BACLE,cACA,IAAIG,OACJ3C,KAAKgC,OAAO,CAACQ;AAEjB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/missingDependencyError.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/missingDependencyError.js
new file mode 100644
index 0000000000000000000000000000000000000000..6e8d61fe0edd8e7686b6aab5f16bba2787f3b09d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/missingDependencyError.js
@@ -0,0 +1,12 @@
+import { bold, cyan, red } from '../picocolors';
+import { getOxfordCommaList } from '../oxford-comma-list';
+import { getPkgManager } from '../helpers/get-pkg-manager';
+export function missingDepsError(dir, missingPackages) {
+ const packagesHuman = getOxfordCommaList(missingPackages.map((p)=>p.pkg));
+ const packagesCli = missingPackages.map((p)=>p.install ?? p.pkg).join(' ');
+ const packageManager = getPkgManager(dir);
+ const removalMsg = '\n\n' + bold('If you are not trying to use TypeScript, please remove the ' + cyan('tsconfig.json') + ' file from your package root (and any TypeScript files in your app and pages directories).');
+ throw new Error(bold(red(`It looks like you're trying to use TypeScript but do not have the required package(s) installed.`)) + '\n\n' + bold(`Please install ${bold(packagesHuman)} by running:`) + '\n\n' + `\t${bold(cyan((packageManager === 'yarn' ? 'yarn add --dev' : packageManager === 'pnpm' ? 'pnpm install --save-dev' : 'npm install --save-dev') + ' ' + packagesCli))}` + removalMsg + '\n');
+}
+
+//# sourceMappingURL=missingDependencyError.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/missingDependencyError.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/missingDependencyError.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2ea08902e4b21192208c1a899307e7fc4c0445fc
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/missingDependencyError.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/missingDependencyError.ts"],"sourcesContent":["import { bold, cyan, red } from '../picocolors'\n\nimport { getOxfordCommaList } from '../oxford-comma-list'\nimport type { MissingDependency } from '../has-necessary-dependencies'\nimport { getPkgManager } from '../helpers/get-pkg-manager'\n\nexport function missingDepsError(\n dir: string,\n missingPackages: MissingDependency[]\n): never {\n const packagesHuman = getOxfordCommaList(missingPackages.map((p) => p.pkg))\n const packagesCli = missingPackages.map((p) => p.install ?? p.pkg).join(' ')\n const packageManager = getPkgManager(dir)\n\n const removalMsg =\n '\\n\\n' +\n bold(\n 'If you are not trying to use TypeScript, please remove the ' +\n cyan('tsconfig.json') +\n ' file from your package root (and any TypeScript files in your app and pages directories).'\n )\n\n throw new Error(\n bold(\n red(\n `It looks like you're trying to use TypeScript but do not have the required package(s) installed.`\n )\n ) +\n '\\n\\n' +\n bold(`Please install ${bold(packagesHuman)} by running:`) +\n '\\n\\n' +\n `\\t${bold(\n cyan(\n (packageManager === 'yarn'\n ? 'yarn add --dev'\n : packageManager === 'pnpm'\n ? 'pnpm install --save-dev'\n : 'npm install --save-dev') +\n ' ' +\n packagesCli\n )\n )}` +\n removalMsg +\n '\\n'\n )\n}\n"],"names":["bold","cyan","red","getOxfordCommaList","getPkgManager","missingDepsError","dir","missingPackages","packagesHuman","map","p","pkg","packagesCli","install","join","packageManager","removalMsg","Error"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,GAAG,QAAQ,gBAAe;AAE/C,SAASC,kBAAkB,QAAQ,uBAAsB;AAEzD,SAASC,aAAa,QAAQ,6BAA4B;AAE1D,OAAO,SAASC,iBACdC,GAAW,EACXC,eAAoC;IAEpC,MAAMC,gBAAgBL,mBAAmBI,gBAAgBE,GAAG,CAAC,CAACC,IAAMA,EAAEC,GAAG;IACzE,MAAMC,cAAcL,gBAAgBE,GAAG,CAAC,CAACC,IAAMA,EAAEG,OAAO,IAAIH,EAAEC,GAAG,EAAEG,IAAI,CAAC;IACxE,MAAMC,iBAAiBX,cAAcE;IAErC,MAAMU,aACJ,SACAhB,KACE,gEACEC,KAAK,mBACL;IAGN,MAAM,IAAIgB,MACRjB,KACEE,IACE,CAAC,gGAAgG,CAAC,KAGpG,SACAF,KAAK,CAAC,eAAe,EAAEA,KAAKQ,eAAe,YAAY,CAAC,IACxD,SACA,CAAC,EAAE,EAAER,KACHC,KACE,AAACc,CAAAA,mBAAmB,SAChB,mBACAA,mBAAmB,SACjB,4BACA,wBAAuB,IAC3B,MACAH,eAEH,GACHI,aACA;AAEN","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheck.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheck.js
new file mode 100644
index 0000000000000000000000000000000000000000..fd0d24b9eebe25c6d43b6bd0e4acf94f2c41f2b2
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheck.js
@@ -0,0 +1,126 @@
+import path from 'path';
+import { getFormattedDiagnostic } from './diagnosticFormatter';
+import { getTypeScriptConfiguration } from './getTypeScriptConfiguration';
+import { getRequiredConfiguration } from './writeConfigurationDefaults';
+import { getDevTypesPath } from './type-paths';
+import { CompileError } from '../compile-error';
+import { warn } from '../../build/output/log';
+/**
+ * Check if a file path matches any of the debug build paths.
+ * Both filePath and debugPaths are resolved file paths from glob.
+ */ function fileMatchesDebugPaths(filePath, debugPaths) {
+ return debugPaths.includes(filePath);
+}
+export async function runTypeCheck(typescript, baseDir, distDir, tsConfigPath, cacheDir, isAppDirEnabled, dirs, debugBuildPaths) {
+ const effectiveConfiguration = await getTypeScriptConfiguration(typescript, tsConfigPath);
+ // tsconfig includes both .next/types and .next/dev/types to avoid config churn
+ // between dev/build modes. During build, we filter out .next/dev/types files to
+ // prevent stale dev types from causing errors when routes have been deleted since
+ // the last dev session.
+ let fileNames = effectiveConfiguration.fileNames;
+ // Get the dev types path to filter (null if not applicable)
+ const devTypesDir = getDevTypesPath(baseDir, distDir);
+ if (devTypesDir) {
+ fileNames = fileNames.filter((fileName)=>!fileName.startsWith(devTypesDir));
+ }
+ // Apply debug build paths filter if specified
+ if (dirs && debugBuildPaths) {
+ const { app: appDir, pages: pagesDir } = dirs;
+ const { app: debugAppPaths, pages: debugPagePaths } = debugBuildPaths;
+ fileNames = fileNames.filter((fileName)=>{
+ // Check if file is in app directory
+ if (appDir && fileName.startsWith(appDir + path.sep)) {
+ // If debugAppPaths is undefined, include all app files
+ if (debugAppPaths === undefined) {
+ return true;
+ }
+ // If debugAppPaths is empty array, exclude all app files
+ if (debugAppPaths.length === 0) {
+ return false;
+ }
+ // Check if file matches any of the debug paths
+ const relativeToApp = fileName.slice(appDir.length);
+ return fileMatchesDebugPaths(relativeToApp, debugAppPaths);
+ }
+ // Check if file is in pages directory
+ if (pagesDir && fileName.startsWith(pagesDir + path.sep)) {
+ // If debugPagePaths is undefined, include all pages files
+ if (debugPagePaths === undefined) {
+ return true;
+ }
+ // If debugPagePaths is empty array, exclude all pages files
+ if (debugPagePaths.length === 0) {
+ return false;
+ }
+ // Check if file matches any of the debug paths
+ const relativeToPages = fileName.slice(pagesDir.length);
+ return fileMatchesDebugPaths(relativeToPages, debugPagePaths);
+ }
+ // Keep files outside app/pages directories (shared code, etc.)
+ return true;
+ });
+ }
+ if (fileNames.length < 1) {
+ return {
+ inputFilesCount: 0,
+ totalFilesCount: 0,
+ incremental: false
+ };
+ }
+ const requiredConfig = getRequiredConfiguration(typescript);
+ const options = {
+ ...requiredConfig,
+ ...effectiveConfiguration.options,
+ declarationMap: false,
+ emitDeclarationOnly: false,
+ noEmit: true
+ };
+ let program;
+ let incremental = false;
+ if ((options.incremental || options.composite) && cacheDir) {
+ if (options.composite) {
+ warn('TypeScript project references are not fully supported. Attempting to build in incremental mode.');
+ }
+ incremental = true;
+ program = typescript.createIncrementalProgram({
+ rootNames: fileNames,
+ options: {
+ ...options,
+ composite: false,
+ incremental: true,
+ tsBuildInfoFile: path.join(cacheDir, '.tsbuildinfo')
+ }
+ });
+ } else {
+ program = typescript.createProgram(fileNames, options);
+ }
+ const result = program.emit();
+ const ignoreRegex = [
+ // matches **/__(tests|mocks)__/**
+ /[\\/]__(?:tests|mocks)__[\\/]/,
+ // matches **/*.(spec|test).*
+ /(?<=[\\/.])(?:spec|test)\.[^\\/]+$/
+ ];
+ const regexIgnoredFile = new RegExp(ignoreRegex.map((r)=>r.source).join('|'));
+ const allDiagnostics = typescript.getPreEmitDiagnostics(program).concat(result.diagnostics).filter((d)=>!(d.file && regexIgnoredFile.test(d.file.fileName)));
+ const firstError = allDiagnostics.find((d)=>d.category === typescript.DiagnosticCategory.Error && Boolean(d.file)) ?? allDiagnostics.find((d)=>d.category === typescript.DiagnosticCategory.Error);
+ // In test mode, we want to check all diagnostics, not just the first one.
+ if (process.env.__NEXT_TEST_MODE) {
+ if (firstError) {
+ const allErrors = allDiagnostics.filter((d)=>d.category === typescript.DiagnosticCategory.Error).map((d)=>'[Test Mode] ' + getFormattedDiagnostic(typescript, baseDir, distDir, d, isAppDirEnabled));
+ console.error('\n\n===== TS errors =====\n\n' + allErrors.join('\n\n') + '\n\n===== TS errors =====\n\n');
+ // Make sure all stdout is flushed before we exit.
+ await new Promise((resolve)=>setTimeout(resolve, 100));
+ }
+ }
+ if (firstError) {
+ throw new CompileError(getFormattedDiagnostic(typescript, baseDir, distDir, firstError, isAppDirEnabled));
+ }
+ return {
+ inputFilesCount: fileNames.length,
+ totalFilesCount: program.getSourceFiles().length,
+ incremental
+ };
+}
+
+//# sourceMappingURL=runTypeCheck.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheck.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheck.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..4767f4ad7c594ddec8df10c7372909b499d830ab
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheck.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/runTypeCheck.ts"],"sourcesContent":["import path from 'path'\nimport { getFormattedDiagnostic } from './diagnosticFormatter'\nimport { getTypeScriptConfiguration } from './getTypeScriptConfiguration'\nimport { getRequiredConfiguration } from './writeConfigurationDefaults'\nimport { getDevTypesPath } from './type-paths'\n\nimport { CompileError } from '../compile-error'\nimport { warn } from '../../build/output/log'\n\nexport interface TypeCheckResult {\n inputFilesCount?: number\n totalFilesCount?: number\n incremental: boolean\n}\n\nexport interface TypeCheckDirs {\n app?: string\n pages?: string\n}\n\nexport interface DebugBuildPaths {\n app?: string[]\n pages?: string[]\n}\n\n/**\n * Check if a file path matches any of the debug build paths.\n * Both filePath and debugPaths are resolved file paths from glob.\n */\nfunction fileMatchesDebugPaths(\n filePath: string,\n debugPaths: string[]\n): boolean {\n return debugPaths.includes(filePath)\n}\n\nexport async function runTypeCheck(\n typescript: typeof import('typescript'),\n baseDir: string,\n distDir: string,\n tsConfigPath: string,\n cacheDir?: string,\n isAppDirEnabled?: boolean,\n dirs?: TypeCheckDirs,\n debugBuildPaths?: DebugBuildPaths\n): Promise {\n const effectiveConfiguration = await getTypeScriptConfiguration(\n typescript,\n tsConfigPath\n )\n\n // tsconfig includes both .next/types and .next/dev/types to avoid config churn\n // between dev/build modes. During build, we filter out .next/dev/types files to\n // prevent stale dev types from causing errors when routes have been deleted since\n // the last dev session.\n let fileNames = effectiveConfiguration.fileNames\n\n // Get the dev types path to filter (null if not applicable)\n const devTypesDir = getDevTypesPath(baseDir, distDir)\n if (devTypesDir) {\n fileNames = fileNames.filter(\n (fileName) => !fileName.startsWith(devTypesDir)\n )\n }\n\n // Apply debug build paths filter if specified\n if (dirs && debugBuildPaths) {\n const { app: appDir, pages: pagesDir } = dirs\n const { app: debugAppPaths, pages: debugPagePaths } = debugBuildPaths\n\n fileNames = fileNames.filter((fileName) => {\n // Check if file is in app directory\n if (appDir && fileName.startsWith(appDir + path.sep)) {\n // If debugAppPaths is undefined, include all app files\n if (debugAppPaths === undefined) {\n return true\n }\n // If debugAppPaths is empty array, exclude all app files\n if (debugAppPaths.length === 0) {\n return false\n }\n // Check if file matches any of the debug paths\n const relativeToApp = fileName.slice(appDir.length)\n return fileMatchesDebugPaths(relativeToApp, debugAppPaths)\n }\n\n // Check if file is in pages directory\n if (pagesDir && fileName.startsWith(pagesDir + path.sep)) {\n // If debugPagePaths is undefined, include all pages files\n if (debugPagePaths === undefined) {\n return true\n }\n // If debugPagePaths is empty array, exclude all pages files\n if (debugPagePaths.length === 0) {\n return false\n }\n // Check if file matches any of the debug paths\n const relativeToPages = fileName.slice(pagesDir.length)\n return fileMatchesDebugPaths(relativeToPages, debugPagePaths)\n }\n\n // Keep files outside app/pages directories (shared code, etc.)\n return true\n })\n }\n\n if (fileNames.length < 1) {\n return {\n inputFilesCount: 0,\n totalFilesCount: 0,\n incremental: false,\n }\n }\n const requiredConfig = getRequiredConfiguration(typescript)\n\n const options = {\n ...requiredConfig,\n ...effectiveConfiguration.options,\n declarationMap: false,\n emitDeclarationOnly: false,\n noEmit: true,\n }\n\n let program:\n | import('typescript').Program\n | import('typescript').BuilderProgram\n let incremental = false\n if ((options.incremental || options.composite) && cacheDir) {\n if (options.composite) {\n warn(\n 'TypeScript project references are not fully supported. Attempting to build in incremental mode.'\n )\n }\n incremental = true\n program = typescript.createIncrementalProgram({\n rootNames: fileNames,\n options: {\n ...options,\n composite: false,\n incremental: true,\n tsBuildInfoFile: path.join(cacheDir, '.tsbuildinfo'),\n },\n })\n } else {\n program = typescript.createProgram(fileNames, options)\n }\n\n const result = program.emit()\n\n const ignoreRegex = [\n // matches **/__(tests|mocks)__/**\n /[\\\\/]__(?:tests|mocks)__[\\\\/]/,\n // matches **/*.(spec|test).*\n /(?<=[\\\\/.])(?:spec|test)\\.[^\\\\/]+$/,\n ]\n const regexIgnoredFile = new RegExp(\n ignoreRegex.map((r) => r.source).join('|')\n )\n\n const allDiagnostics = typescript\n .getPreEmitDiagnostics(program as import('typescript').Program)\n .concat(result.diagnostics)\n .filter((d) => !(d.file && regexIgnoredFile.test(d.file.fileName)))\n\n const firstError =\n allDiagnostics.find(\n (d) =>\n d.category === typescript.DiagnosticCategory.Error && Boolean(d.file)\n ) ??\n allDiagnostics.find(\n (d) => d.category === typescript.DiagnosticCategory.Error\n )\n\n // In test mode, we want to check all diagnostics, not just the first one.\n if (process.env.__NEXT_TEST_MODE) {\n if (firstError) {\n const allErrors = allDiagnostics\n .filter((d) => d.category === typescript.DiagnosticCategory.Error)\n .map(\n (d) =>\n '[Test Mode] ' +\n getFormattedDiagnostic(\n typescript,\n baseDir,\n distDir,\n d,\n isAppDirEnabled\n )\n )\n\n console.error(\n '\\n\\n===== TS errors =====\\n\\n' +\n allErrors.join('\\n\\n') +\n '\\n\\n===== TS errors =====\\n\\n'\n )\n\n // Make sure all stdout is flushed before we exit.\n await new Promise((resolve) => setTimeout(resolve, 100))\n }\n }\n\n if (firstError) {\n throw new CompileError(\n getFormattedDiagnostic(\n typescript,\n baseDir,\n distDir,\n firstError,\n isAppDirEnabled\n )\n )\n }\n\n return {\n inputFilesCount: fileNames.length,\n totalFilesCount: program.getSourceFiles().length,\n incremental,\n }\n}\n"],"names":["path","getFormattedDiagnostic","getTypeScriptConfiguration","getRequiredConfiguration","getDevTypesPath","CompileError","warn","fileMatchesDebugPaths","filePath","debugPaths","includes","runTypeCheck","typescript","baseDir","distDir","tsConfigPath","cacheDir","isAppDirEnabled","dirs","debugBuildPaths","effectiveConfiguration","fileNames","devTypesDir","filter","fileName","startsWith","app","appDir","pages","pagesDir","debugAppPaths","debugPagePaths","sep","undefined","length","relativeToApp","slice","relativeToPages","inputFilesCount","totalFilesCount","incremental","requiredConfig","options","declarationMap","emitDeclarationOnly","noEmit","program","composite","createIncrementalProgram","rootNames","tsBuildInfoFile","join","createProgram","result","emit","ignoreRegex","regexIgnoredFile","RegExp","map","r","source","allDiagnostics","getPreEmitDiagnostics","concat","diagnostics","d","file","test","firstError","find","category","DiagnosticCategory","Error","Boolean","process","env","__NEXT_TEST_MODE","allErrors","console","error","Promise","resolve","setTimeout","getSourceFiles"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AACvB,SAASC,sBAAsB,QAAQ,wBAAuB;AAC9D,SAASC,0BAA0B,QAAQ,+BAA8B;AACzE,SAASC,wBAAwB,QAAQ,+BAA8B;AACvE,SAASC,eAAe,QAAQ,eAAc;AAE9C,SAASC,YAAY,QAAQ,mBAAkB;AAC/C,SAASC,IAAI,QAAQ,yBAAwB;AAkB7C;;;CAGC,GACD,SAASC,sBACPC,QAAgB,EAChBC,UAAoB;IAEpB,OAAOA,WAAWC,QAAQ,CAACF;AAC7B;AAEA,OAAO,eAAeG,aACpBC,UAAuC,EACvCC,OAAe,EACfC,OAAe,EACfC,YAAoB,EACpBC,QAAiB,EACjBC,eAAyB,EACzBC,IAAoB,EACpBC,eAAiC;IAEjC,MAAMC,yBAAyB,MAAMlB,2BACnCU,YACAG;IAGF,+EAA+E;IAC/E,gFAAgF;IAChF,kFAAkF;IAClF,wBAAwB;IACxB,IAAIM,YAAYD,uBAAuBC,SAAS;IAEhD,4DAA4D;IAC5D,MAAMC,cAAclB,gBAAgBS,SAASC;IAC7C,IAAIQ,aAAa;QACfD,YAAYA,UAAUE,MAAM,CAC1B,CAACC,WAAa,CAACA,SAASC,UAAU,CAACH;IAEvC;IAEA,8CAA8C;IAC9C,IAAIJ,QAAQC,iBAAiB;QAC3B,MAAM,EAAEO,KAAKC,MAAM,EAAEC,OAAOC,QAAQ,EAAE,GAAGX;QACzC,MAAM,EAAEQ,KAAKI,aAAa,EAAEF,OAAOG,cAAc,EAAE,GAAGZ;QAEtDE,YAAYA,UAAUE,MAAM,CAAC,CAAC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BACEW,YACAC,SACAC,SACAsD,YACAnD;IAGN;IAEA,OAAO;QACLqB,iBAAiBjB,UAAUa,MAAM;QACjCK,iBAAiBO,QAAQqC,cAAc,GAAGjD,MAAM;QAChDM;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheckCli.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheckCli.js
new file mode 100644
index 0000000000000000000000000000000000000000..1628924fa3619883e30e155a529c30e9ea83c98d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheckCli.js
@@ -0,0 +1,37 @@
+import path from 'node:path';
+import { CompileError } from '../compile-error';
+import { getTypeScriptConfigurationCli, runTypeScriptCli } from './runTypeScriptCli';
+export async function runTypeCheckCli({ baseDir, tsConfigPath, tscPath, cacheDir, onFirstOutput }) {
+ const configuration = await getTypeScriptConfigurationCli({
+ baseDir,
+ tsConfigPath,
+ tscPath
+ });
+ const incremental = Boolean(configuration.compilerOptions.incremental || configuration.compilerOptions.composite);
+ const args = [
+ '--project',
+ tsConfigPath,
+ '--noEmit',
+ '--declarationMap',
+ 'false',
+ '--emitDeclarationOnly',
+ 'false'
+ ];
+ if (incremental && cacheDir) {
+ args.push('--tsBuildInfoFile', path.join(cacheDir, '.tsbuildinfo'));
+ }
+ const result = await runTypeScriptCli({
+ cwd: baseDir,
+ tscPath,
+ args,
+ onFirstOutput
+ });
+ if (result.exitCode !== 0) {
+ throw new CompileError();
+ }
+ return {
+ incremental
+ };
+}
+
+//# sourceMappingURL=runTypeCheckCli.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheckCli.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheckCli.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..89ec1a91abf648ac79040317eb181e469f0bb501
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeCheckCli.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/runTypeCheckCli.ts"],"sourcesContent":["import path from 'node:path'\n\nimport { CompileError } from '../compile-error'\nimport type { TypeCheckResult } from './runTypeCheck'\nimport {\n getTypeScriptConfigurationCli,\n runTypeScriptCli,\n} from './runTypeScriptCli'\n\nexport async function runTypeCheckCli({\n baseDir,\n tsConfigPath,\n tscPath,\n cacheDir,\n onFirstOutput,\n}: {\n baseDir: string\n tsConfigPath: string\n tscPath: string\n cacheDir?: string\n /**\n * Called once when `tsc` first produces output. Used to stop the build\n * spinner so it does not sit above the diagnostics.\n */\n onFirstOutput?: () => void\n}): Promise {\n const configuration = await getTypeScriptConfigurationCli({\n baseDir,\n tsConfigPath,\n tscPath,\n })\n const incremental = Boolean(\n configuration.compilerOptions.incremental ||\n configuration.compilerOptions.composite\n )\n const args = [\n '--project',\n tsConfigPath,\n '--noEmit',\n '--declarationMap',\n 'false',\n '--emitDeclarationOnly',\n 'false',\n ]\n\n if (incremental && cacheDir) {\n args.push('--tsBuildInfoFile', path.join(cacheDir, '.tsbuildinfo'))\n }\n\n const result = await runTypeScriptCli({\n cwd: baseDir,\n tscPath,\n args,\n onFirstOutput,\n })\n\n if (result.exitCode !== 0) {\n throw new CompileError()\n }\n\n return {\n incremental,\n }\n}\n"],"names":["path","CompileError","getTypeScriptConfigurationCli","runTypeScriptCli","runTypeCheckCli","baseDir","tsConfigPath","tscPath","cacheDir","onFirstOutput","configuration","incremental","Boolean","compilerOptions","composite","args","push","join","result","cwd","exitCode"],"mappings":"AAAA,OAAOA,UAAU,YAAW;AAE5B,SAASC,YAAY,QAAQ,mBAAkB;AAE/C,SACEC,6BAA6B,EAC7BC,gBAAgB,QACX,qBAAoB;AAE3B,OAAO,eAAeC,gBAAgB,EACpCC,OAAO,EACPC,YAAY,EACZC,OAAO,EACPC,QAAQ,EACRC,aAAa,EAWd;IACC,MAAMC,gBAAgB,MAAMR,8BAA8B;QACxDG;QACAC;QACAC;IACF;IACA,MAAMI,cAAcC,QAClBF,cAAcG,eAAe,CAACF,WAAW,IACvCD,cAAcG,eAAe,CAACC,SAAS;IAE3C,MAAMC,OAAO;QACX;QACAT;QACA;QACA;QACA;QACA;QACA;KACD;IAED,IAAIK,eAAeH,UAAU;QAC3BO,KAAKC,IAAI,CAAC,qBAAqBhB,KAAKiB,IAAI,CAACT,UAAU;IACrD;IAEA,MAAMU,SAAS,MAAMf,iBAAiB;QACpCgB,KAAKd;QACLE;QACAQ;QACAN;IACF;IAEA,IAAIS,OAAOE,QAAQ,KAAK,GAAG;QACzB,MAAM,IAAInB;IACZ;IAEA,OAAO;QACLU;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeScriptCli.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeScriptCli.js
new file mode 100644
index 0000000000000000000000000000000000000000..5f5ed65da2acd7b6b2f29e872e835e583db69d46
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeScriptCli.js
@@ -0,0 +1,205 @@
+import { existsSync, readFileSync } from 'node:fs';
+import path from 'node:path';
+import { spawnSync } from 'node:child_process';
+import spawn from 'next/dist/compiled/cross-spawn';
+import { bold } from '../picocolors';
+import { resolveFrom } from '../resolve-from';
+export function getTypeScriptPackageInfo(baseDir) {
+ var _packageJson_bin, _Object_entries_find;
+ let packageJsonPath;
+ try {
+ packageJsonPath = resolveFrom(baseDir, 'typescript/package.json');
+ } catch {
+ return null;
+ }
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
+ const packageDir = path.dirname(packageJsonPath);
+ const apiPath = path.join(packageDir, 'lib', 'typescript.js');
+ const tscBin = typeof packageJson.bin === 'string' ? packageJson.bin : ((_packageJson_bin = packageJson.bin) == null ? void 0 : _packageJson_bin.tsc) ?? ((_Object_entries_find = Object.entries(packageJson.bin ?? {}).find(([name])=>/^tsc\d+$/.test(name))) == null ? void 0 : _Object_entries_find[1]);
+ const tscBinPath = tscBin ? path.resolve(packageDir, tscBin) : undefined;
+ let tscPath = tscBinPath;
+ if (tscBinPath && existsSync(tscBinPath) && packageJson.type === 'module' && path.extname(tscBinPath) === '') {
+ // TypeScript 7's extensionless ESM bin wrapper cannot be used as Node's
+ // main entry point on Node.js 20.9. Its imported JS entry is the same CLI
+ // wrapper and works across all supported Node.js versions.
+ const tscJsPath = path.join(packageDir, 'lib', 'tsc.js');
+ if (existsSync(tscJsPath)) {
+ tscPath = tscJsPath;
+ }
+ }
+ return {
+ packageJsonPath,
+ packageDir,
+ version: packageJson.version,
+ apiPath: existsSync(apiPath) ? apiPath : undefined,
+ tscPath: tscPath && existsSync(tscPath) ? tscPath : undefined
+ };
+}
+export function hasNativeTypeScriptPreview(baseDir) {
+ try {
+ resolveFrom(baseDir, '@typescript/native-preview/package.json');
+ return true;
+ } catch {
+ return false;
+ }
+}
+export function getTypeScriptApiMissingError(version) {
+ return new Error(`TypeScript ${version} does not provide the compiler API required by Next.js. ` + `Set ${bold('experimental.useTypeScriptCli')} back to true in your Next.js config to use the TypeScript CLI, ` + `or install TypeScript 6 instead.`);
+}
+const terminationSignals = [
+ 'SIGINT',
+ 'SIGTERM',
+ 'SIGHUP'
+];
+export function runTypeScriptCli({ cwd, tscPath, args, captureOutput = false, onFirstOutput }) {
+ return new Promise((resolve, reject)=>{
+ var _child_stdout, _child_stderr;
+ const child = spawn(process.execPath, [
+ tscPath,
+ ...args
+ ], {
+ cwd,
+ // TypeScript 7's Node wrapper starts the native compiler synchronously
+ // on older Node.js releases. A separate process group lets termination
+ // reach both processes instead of orphaning the native compiler.
+ detached: process.platform !== 'win32',
+ shell: false,
+ stdio: [
+ 'ignore',
+ 'pipe',
+ 'pipe'
+ ],
+ env: {
+ ...process.env,
+ // Piping stdio makes `tsc` disable colored/pretty diagnostics. Restore
+ // them when we are forwarding output to a TTY (not capturing it for
+ // parsing, e.g. `--showConfig`).
+ ...!captureOutput && process.stdout.isTTY ? {
+ FORCE_COLOR: '1'
+ } : undefined
+ }
+ });
+ let stdout = '';
+ let stderr = '';
+ (_child_stdout = child.stdout) == null ? void 0 : _child_stdout.setEncoding('utf8');
+ (_child_stderr = child.stderr) == null ? void 0 : _child_stderr.setEncoding('utf8');
+ if (captureOutput) {
+ var _child_stdout1, _child_stderr1;
+ (_child_stdout1 = child.stdout) == null ? void 0 : _child_stdout1.on('data', (chunk)=>{
+ stdout += chunk;
+ });
+ (_child_stderr1 = child.stderr) == null ? void 0 : _child_stderr1.on('data', (chunk)=>{
+ stderr += chunk;
+ });
+ } else {
+ var _child_stdout2, _child_stderr2;
+ const forward = (dest, chunk)=>{
+ onFirstOutput == null ? void 0 : onFirstOutput();
+ onFirstOutput = undefined // ensure we don't call it again
+ ;
+ dest.write(chunk);
+ };
+ (_child_stdout2 = child.stdout) == null ? void 0 : _child_stdout2.on('data', (chunk)=>{
+ forward(process.stdout, chunk);
+ });
+ (_child_stderr2 = child.stderr) == null ? void 0 : _child_stderr2.on('data', (chunk)=>{
+ forward(process.stderr, chunk);
+ });
+ }
+ let terminationRequested = false;
+ const terminateChild = ()=>{
+ if (terminationRequested || child.killed || child.pid === undefined) {
+ return;
+ }
+ terminationRequested = true;
+ // The native compiler ignores SIGTERM and SIGINT, so send a kill signal.
+ // Target the whole process group so the signal reaches the native compiler whether
+ // it is a grandchild or a direct child.
+ // https://github.com/microsoft/typescript-go/pull/4592 should improve this in the long run
+ if (process.platform === 'win32') {
+ spawnSync('taskkill', [
+ '/pid',
+ String(child.pid),
+ '/T',
+ '/F'
+ ], {
+ stdio: 'ignore',
+ windowsHide: true
+ });
+ } else {
+ try {
+ // https://www.youtube.com/watch?v=Fow7iUaKrq4
+ process.kill(-child.pid, 'SIGKILL');
+ } catch {
+ // The process may have exited between the lifecycle event and kill.
+ }
+ }
+ };
+ const terminateOnExit = ()=>terminateChild();
+ process.once('exit', terminateOnExit);
+ const handler = ()=>{
+ terminateChild();
+ process.exit(1);
+ };
+ for (const signal of terminationSignals){
+ process.once(signal, handler);
+ }
+ const cleanup = ()=>{
+ process.off('exit', terminateOnExit);
+ for (const signal of terminationSignals){
+ process.off(signal, handler);
+ }
+ };
+ let settled = false;
+ const finish = (settle)=>{
+ if (settled) {
+ return;
+ }
+ settled = true;
+ cleanup();
+ settle();
+ };
+ child.on('error', (error)=>{
+ finish(()=>reject(error));
+ });
+ child.on('close', (code, signal)=>{
+ finish(()=>{
+ resolve({
+ exitCode: code ?? 1,
+ signal,
+ stdout,
+ stderr
+ });
+ });
+ });
+ });
+}
+export async function getTypeScriptConfigurationCli({ baseDir, tsConfigPath, tscPath }) {
+ const result = await runTypeScriptCli({
+ cwd: baseDir,
+ tscPath,
+ args: [
+ '--showConfig',
+ '--project',
+ tsConfigPath,
+ '--pretty',
+ 'false'
+ ],
+ captureOutput: true
+ });
+ if (result.exitCode !== 0) {
+ throw new Error([
+ result.stdout,
+ result.stderr
+ ].filter(Boolean).join('\n').trim());
+ }
+ try {
+ return JSON.parse(result.stdout);
+ } catch (cause) {
+ throw new Error(`Could not parse output from TypeScript's --showConfig.`, {
+ cause
+ });
+ }
+}
+
+//# sourceMappingURL=runTypeScriptCli.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeScriptCli.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeScriptCli.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..68f2e38544f6035f17eaa2aff1fc4bd2d9fbae74
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/runTypeScriptCli.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/runTypeScriptCli.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'node:fs'\nimport path from 'node:path'\nimport { spawnSync } from 'node:child_process'\n\nimport spawn from 'next/dist/compiled/cross-spawn'\n\nimport { bold } from '../picocolors'\nimport { resolveFrom } from '../resolve-from'\n\nexport interface TypeScriptPackageInfo {\n packageJsonPath: string\n packageDir: string\n version: string\n apiPath?: string\n tscPath?: string\n}\n\nexport function getTypeScriptPackageInfo(\n baseDir: string\n): TypeScriptPackageInfo | null {\n let packageJsonPath: string\n try {\n packageJsonPath = resolveFrom(baseDir, 'typescript/package.json')\n } catch {\n return null\n }\n\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8')) as {\n version: string\n type?: string\n bin?: string | Record\n }\n const packageDir = path.dirname(packageJsonPath)\n const apiPath = path.join(packageDir, 'lib', 'typescript.js')\n const tscBin =\n typeof packageJson.bin === 'string'\n ? packageJson.bin\n : (packageJson.bin?.tsc ??\n Object.entries(packageJson.bin ?? {}).find(([name]) =>\n /^tsc\\d+$/.test(name)\n )?.[1])\n const tscBinPath = tscBin ? path.resolve(packageDir, tscBin) : undefined\n let tscPath = tscBinPath\n\n if (\n tscBinPath &&\n existsSync(tscBinPath) &&\n packageJson.type === 'module' &&\n path.extname(tscBinPath) === ''\n ) {\n // TypeScript 7's extensionless ESM bin wrapper cannot be used as Node's\n // main entry point on Node.js 20.9. Its imported JS entry is the same CLI\n // wrapper and works across all supported Node.js versions.\n const tscJsPath = path.join(packageDir, 'lib', 'tsc.js')\n if (existsSync(tscJsPath)) {\n tscPath = tscJsPath\n }\n }\n\n return {\n packageJsonPath,\n packageDir,\n version: packageJson.version,\n apiPath: existsSync(apiPath) ? apiPath : undefined,\n tscPath: tscPath && existsSync(tscPath) ? tscPath : undefined,\n }\n}\n\nexport function hasNativeTypeScriptPreview(baseDir: string): boolean {\n try {\n resolveFrom(baseDir, '@typescript/native-preview/package.json')\n return true\n } catch {\n return false\n }\n}\n\nexport function getTypeScriptApiMissingError(version: string): Error {\n return new Error(\n `TypeScript ${version} does not provide the compiler API required by Next.js. ` +\n `Set ${bold('experimental.useTypeScriptCli')} back to true in your Next.js config to use the TypeScript CLI, ` +\n `or install TypeScript 6 instead.`\n )\n}\n\nexport interface TypeScriptCliResult {\n exitCode: number\n signal: NodeJS.Signals | null\n stdout: string\n stderr: string\n}\n\nconst terminationSignals: NodeJS.Signals[] = ['SIGINT', 'SIGTERM', 'SIGHUP']\n\nexport function runTypeScriptCli({\n cwd,\n tscPath,\n args,\n captureOutput = false,\n onFirstOutput,\n}: {\n cwd: string\n tscPath: string\n args: string[]\n /**\n * Accumulate stdout/stderr into the resolved result instead of forwarding it\n * to this process's stdout/stderr (for e.g. parsing `--showConfig` output).\n */\n captureOutput?: boolean\n /**\n * Called once, on the first chunk of forwarded output. Used to stop the build\n * spinner before `tsc`'s diagnostics appear. Not called when capturing.\n */\n onFirstOutput?: () => void\n}): Promise {\n return new Promise((resolve, reject) => {\n const child = spawn(process.execPath, [tscPath, ...args], {\n cwd,\n // TypeScript 7's Node wrapper starts the native compiler synchronously\n // on older Node.js releases. A separate process group lets termination\n // reach both processes instead of orphaning the native compiler.\n detached: process.platform !== 'win32',\n shell: false,\n stdio: ['ignore', 'pipe', 'pipe'],\n env: {\n ...process.env,\n // Piping stdio makes `tsc` disable colored/pretty diagnostics. Restore\n // them when we are forwarding output to a TTY (not capturing it for\n // parsing, e.g. `--showConfig`).\n ...(!captureOutput && process.stdout.isTTY\n ? { FORCE_COLOR: '1' }\n : undefined),\n },\n })\n\n let stdout = ''\n let stderr = ''\n\n child.stdout?.setEncoding('utf8')\n child.stderr?.setEncoding('utf8')\n\n if (captureOutput) {\n child.stdout?.on('data', (chunk: string) => {\n stdout += chunk\n })\n child.stderr?.on('data', (chunk: string) => {\n stderr += chunk\n })\n } else {\n const forward = (dest: NodeJS.WriteStream, chunk: string) => {\n onFirstOutput?.()\n onFirstOutput = undefined // ensure we don't call it again\n dest.write(chunk)\n }\n\n child.stdout?.on('data', (chunk: string) => {\n forward(process.stdout, chunk)\n })\n child.stderr?.on('data', (chunk: string) => {\n forward(process.stderr, chunk)\n })\n }\n\n let terminationRequested = false\n const terminateChild = () => {\n if (terminationRequested || child.killed || child.pid === undefined) {\n return\n }\n terminationRequested = true\n\n // The native compiler ignores SIGTERM and SIGINT, so send a kill signal.\n // Target the whole process group so the signal reaches the native compiler whether\n // it is a grandchild or a direct child.\n // https://github.com/microsoft/typescript-go/pull/4592 should improve this in the long run\n if (process.platform === 'win32') {\n spawnSync('taskkill', ['/pid', String(child.pid), '/T', '/F'], {\n stdio: 'ignore',\n windowsHide: true,\n })\n } else {\n try {\n // https://www.youtube.com/watch?v=Fow7iUaKrq4\n process.kill(-child.pid, 'SIGKILL')\n } catch {\n // The process may have exited between the lifecycle event and kill.\n }\n }\n }\n const terminateOnExit = () => terminateChild()\n process.once('exit', terminateOnExit)\n\n const handler = () => {\n terminateChild()\n process.exit(1)\n }\n for (const signal of terminationSignals) {\n process.once(signal, handler)\n }\n\n const cleanup = () => {\n process.off('exit', terminateOnExit)\n for (const signal of terminationSignals) {\n process.off(signal, handler)\n }\n }\n\n let settled = false\n const finish = (settle: () => void) => {\n if (settled) {\n return\n }\n settled = true\n cleanup()\n settle()\n }\n\n child.on('error', (error) => {\n finish(() => reject(error))\n })\n child.on('close', (code, signal) => {\n finish(() => {\n resolve({\n exitCode: code ?? 1,\n signal,\n stdout,\n stderr,\n })\n })\n })\n })\n}\n\nexport async function getTypeScriptConfigurationCli({\n baseDir,\n tsConfigPath,\n tscPath,\n}: {\n baseDir: string\n tsConfigPath: string\n tscPath: string\n}): Promise<{ compilerOptions: Record }> {\n const result = await runTypeScriptCli({\n cwd: baseDir,\n tscPath,\n args: ['--showConfig', '--project', tsConfigPath, '--pretty', 'false'],\n captureOutput: true,\n })\n\n if (result.exitCode !== 0) {\n throw new Error(\n [result.stdout, result.stderr].filter(Boolean).join('\\n').trim()\n )\n }\n\n try {\n return JSON.parse(result.stdout)\n } catch (cause) {\n throw new Error(`Could not parse output from TypeScript's --showConfig.`, {\n cause,\n })\n }\n}\n"],"names":["existsSync","readFileSync","path","spawnSync","spawn","bold","resolveFrom","getTypeScriptPackageInfo","baseDir","packageJson","Object","packageJsonPath","JSON","parse","packageDir","dirname","apiPath","join","tscBin","bin","tsc","entries","find","name","test","tscBinPath","resolve","undefined","tscPath","type","extname","tscJsPath","version","hasNativeTypeScriptPreview","getTypeScriptApiMissingError","Error","terminationSignals","runTypeScriptCli","cwd","args","captureOutput","onFirstOutput","Promise","reject","child","process","execPath","detached","platform","shell","stdio","env","stdout","isTTY","FORCE_COLOR","stderr","setEncoding","on","chunk","forward","dest","write","terminationRequested","terminateChild","killed","pid","String","windowsHide","kill","terminateOnExit","once","handler","exit","signal","cleanup","off","settled","finish","settle","error","code","exitCode","getTypeScriptConfigurationCli","tsConfigPath","result","filter","Boolean","trim","cause"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,UAAS;AAClD,OAAOC,UAAU,YAAW;AAC5B,SAASC,SAAS,QAAQ,qBAAoB;AAE9C,OAAOC,WAAW,iCAAgC;AAElD,SAASC,IAAI,QAAQ,gBAAe;AACpC,SAASC,WAAW,QAAQ,kBAAiB;AAU7C,OAAO,SAASC,yBACdC,OAAe;QAmBRC,kBACDC;IAlBN,IAAIC;IACJ,IAAI;QACFA,kBAAkBL,YAAYE,SAAS;IACzC,EAAE,OAAM;QACN,OAAO;IACT;IAEA,MAAMC,cAAcG,KAAKC,KAAK,CAACZ,aAAaU,iBAAiB;IAK7D,MAAMG,aAAaZ,KAAKa,OAAO,CAACJ;IAChC,MAAMK,UAAUd,KAAKe,IAAI,CAACH,YAAY,OAAO;IAC7C,MAAMI,SACJ,OAAOT,YAAYU,GAAG,KAAK,WACvBV,YAAYU,GAAG,GACdV,EAAAA,mBAAAA,YAAYU,GAAG,qBAAfV,iBAAiBW,GAAG,OACrBV,uBAAAA,OAAOW,OAAO,CAACZ,YAAYU,GAAG,IAAI,CAAC,GAAGG,IAAI,CAAC,CAAC,CAACC,KAAK,GAChD,WAAWC,IAAI,CAACD,2BADlBb,oBAEG,CAAC,EAAE;IACZ,MAAMe,aAAaP,SAAShB,KAAKwB,OAAO,CAACZ,YAAYI,UAAUS;IAC/D,IAAIC,UAAUH;IAEd,IACEA,cACAzB,WAAWy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AO;QACd,MAAM,IAAIrD,MAAM,CAAC,sDAAsD,CAAC,EAAE;YACxEqD;QACF;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/type-paths.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/type-paths.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d54deb7b330bfaeb76a7f5f52ef97b3656d9317
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/type-paths.js
@@ -0,0 +1,32 @@
+import path from 'path';
+/**
+ * Gets the glob patterns for type definition directories in tsconfig.
+ * Next.js uses different distDir paths in development vs production:
+ * - Development: "{distDir}/dev"
+ * - Production: "{distDir}"
+ */ export function getTypeDefinitionGlobPatterns(distDir) {
+ const distDirPosix = path.win32.sep === path.sep ? distDir.replaceAll(path.win32.sep, path.posix.sep) : distDir;
+ const typeGlobPatterns = [
+ `${distDirPosix}/types/**/*.ts`
+ ];
+ // Include both .next/types and .next/dev/types to avoid tsconfig churn when switching
+ // between dev/build modes
+ typeGlobPatterns.push(process.env.NODE_ENV === 'development' ? `${distDirPosix.replace(/\/dev$/, '')}/types/**/*.ts` : `${distDirPosix}/dev/types/**/*.ts`);
+ // Sort for consistent order
+ typeGlobPatterns.sort((a, b)=>a.length - b.length);
+ return typeGlobPatterns;
+}
+/**
+ * Gets the absolute path to the dev types directory for filtering during type-checking.
+ * Returns null in dev mode (where dev types are the main types).
+ */ export function getDevTypesPath(baseDir, distDir) {
+ const isDev = process.env.NODE_ENV === 'development';
+ if (isDev) {
+ // In dev mode, dev types are the main types, so no need to filter
+ return null;
+ }
+ // In build mode, dev types are at "{baseDir}/{distDir}/dev/types" and should be filtered
+ return path.join(baseDir, distDir, 'dev', 'types');
+}
+
+//# sourceMappingURL=type-paths.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/type-paths.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/type-paths.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..826cb3372be145054b0488bda07cda693150b58a
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/type-paths.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/type-paths.ts"],"sourcesContent":["import path from 'path'\n\n/**\n * Gets the glob patterns for type definition directories in tsconfig.\n * Next.js uses different distDir paths in development vs production:\n * - Development: \"{distDir}/dev\"\n * - Production: \"{distDir}\"\n */\nexport function getTypeDefinitionGlobPatterns(distDir: string): string[] {\n const distDirPosix =\n path.win32.sep === path.sep\n ? distDir.replaceAll(path.win32.sep, path.posix.sep)\n : distDir\n\n const typeGlobPatterns: string[] = [`${distDirPosix}/types/**/*.ts`]\n\n // Include both .next/types and .next/dev/types to avoid tsconfig churn when switching\n // between dev/build modes\n typeGlobPatterns.push(\n process.env.NODE_ENV === 'development'\n ? // In dev, distDir is \"{distDir}/dev\", so also include \"{distDir}/types\"\n `${distDirPosix.replace(/\\/dev$/, '')}/types/**/*.ts`\n : // In build, distDir is \"{distDir}\", so also include \"{distDir}/dev/types\"\n `${distDirPosix}/dev/types/**/*.ts`\n )\n // Sort for consistent order\n typeGlobPatterns.sort((a, b) => a.length - b.length)\n\n return typeGlobPatterns\n}\n\n/**\n * Gets the absolute path to the dev types directory for filtering during type-checking.\n * Returns null in dev mode (where dev types are the main types).\n */\nexport function getDevTypesPath(\n baseDir: string,\n distDir: string\n): string | null {\n const isDev = process.env.NODE_ENV === 'development'\n if (isDev) {\n // In dev mode, dev types are the main types, so no need to filter\n return null\n }\n\n // In build mode, dev types are at \"{baseDir}/{distDir}/dev/types\" and should be filtered\n return path.join(baseDir, distDir, 'dev', 'types')\n}\n"],"names":["path","getTypeDefinitionGlobPatterns","distDir","distDirPosix","win32","sep","replaceAll","posix","typeGlobPatterns","push","process","env","NODE_ENV","replace","sort","a","b","length","getDevTypesPath","baseDir","isDev","join"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AAEvB;;;;;CAKC,GACD,OAAO,SAASC,8BAA8BC,OAAe;IAC3D,MAAMC,eACJH,KAAKI,KAAK,CAACC,GAAG,KAAKL,KAAKK,GAAG,GACvBH,QAAQI,UAAU,CAACN,KAAKI,KAAK,CAACC,GAAG,EAAEL,KAAKO,KAAK,CAACF,GAAG,IACjDH;IAEN,MAAMM,mBAA6B;QAAC,GAAGL,aAAa,cAAc,CAAC;KAAC;IAEpE,sFAAsF;IACtF,0BAA0B;IAC1BK,iBAAiBC,IAAI,CACnBC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBAErB,GAAGT,aAAaU,OAAO,CAAC,UAAU,IAAI,cAAc,CAAC,GAErD,GAAGV,aAAa,kBAAkB,CAAC;IAEzC,4BAA4B;IAC5BK,iBAAiBM,IAAI,CAAC,CAACC,GAAGC,IAAMD,EAAEE,MAAM,GAAGD,EAAEC,MAAM;IAEnD,OAAOT;AACT;AAEA;;;CAGC,GACD,OAAO,SAASU,gBACdC,OAAe,EACfjB,OAAe;IAEf,MAAMkB,QAAQV,QAAQC,GAAG,CAACC,QAAQ,KAAK;IACvC,IAAIQ,OAAO;QACT,kEAAkE;QAClE,OAAO;IACT;IAEA,yFAAyF;IACzF,OAAOpB,KAAKqB,IAAI,CAACF,SAASjB,SAAS,OAAO;AAC5C","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/writeAppTypeDeclarations.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeAppTypeDeclarations.js
new file mode 100644
index 0000000000000000000000000000000000000000..8cd8c8ff7e6f01ddb398e90a02b38aba43256d8d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeAppTypeDeclarations.js
@@ -0,0 +1,62 @@
+import os from 'os';
+import path from 'path';
+import { promises as fs } from 'fs';
+export async function writeAppTypeDeclarations({ baseDir, distDir, imageImportsEnabled, hasPagesDir, hasAppDir, strictRouteTypes, typedRoutes }) {
+ // Reference `next` types
+ const appTypeDeclarations = path.join(baseDir, 'next-env.d.ts');
+ // Defaults EOL to system default
+ let eol = os.EOL;
+ let currentContent;
+ try {
+ currentContent = await fs.readFile(appTypeDeclarations, 'utf8');
+ // If file already exists then preserve its line ending
+ const lf = currentContent.indexOf('\n', /* skip first so we can lf - 1 */ 1);
+ if (lf !== -1) {
+ if (currentContent[lf - 1] === '\r') {
+ eol = '\r\n';
+ } else {
+ eol = '\n';
+ }
+ }
+ } catch {}
+ /**
+ * "Triple-slash directives" used to create typings files for Next.js projects
+ * using Typescript .
+ *
+ * @see https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html
+ */ const lines = [
+ // Include the core Next.js typings.
+ '/// '
+ ];
+ if (imageImportsEnabled) {
+ lines.push('/// ');
+ }
+ if (hasAppDir && hasPagesDir) {
+ lines.push('/// ');
+ }
+ const routeTypesPath = path.posix.join(distDir.replaceAll(path.win32.sep, path.posix.sep), 'types/routes.d.ts');
+ // Use ESM import instead of triple-slash reference for better ESLint compatibility
+ lines.push(`import "./${routeTypesPath}";`);
+ const rootParamsTypesPath = path.posix.join(distDir.replaceAll(path.win32.sep, path.posix.sep), 'types/root-params.d.ts');
+ lines.push(`import "./${rootParamsTypesPath}";`);
+ if (strictRouteTypes) {
+ const cacheLifePath = path.posix.join(distDir.replaceAll(path.win32.sep, path.posix.sep), 'types/cache-life.d.ts');
+ lines.push(`import "./${cacheLifePath}";`);
+ const routeValidatorPath = path.posix.join(distDir.replaceAll(path.win32.sep, path.posix.sep), 'types/validator.ts');
+ lines.push(`import "./${routeValidatorPath}";`);
+ if (typedRoutes === true) {
+ const linkTypesPath = path.posix.join(distDir.replaceAll(path.win32.sep, path.posix.sep), 'types/link.d.ts');
+ lines.push(`import "./${linkTypesPath}";`);
+ }
+ }
+ // Push the notice in.
+ lines.push('', '// NOTE: This file should not be edited', `// see https://nextjs.org/docs/${hasAppDir ? 'app' : 'pages'}/api-reference/config/typescript for more information.`);
+ const content = lines.join(eol) + eol;
+ // Avoids an un-necessary write on read-only fs
+ if (currentContent === content) {
+ return;
+ }
+ await fs.writeFile(appTypeDeclarations, content);
+}
+
+//# sourceMappingURL=writeAppTypeDeclarations.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/writeAppTypeDeclarations.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeAppTypeDeclarations.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..8d4149f7a117be481df045102572ec22c9b64a66
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeAppTypeDeclarations.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/writeAppTypeDeclarations.ts"],"sourcesContent":["import os from 'os'\nimport path from 'path'\nimport { promises as fs } from 'fs'\n\nexport async function writeAppTypeDeclarations({\n baseDir,\n distDir,\n imageImportsEnabled,\n hasPagesDir,\n hasAppDir,\n strictRouteTypes,\n typedRoutes,\n}: {\n baseDir: string\n distDir: string\n imageImportsEnabled: boolean\n hasPagesDir: boolean\n hasAppDir: boolean\n strictRouteTypes: boolean\n typedRoutes: boolean\n}): Promise {\n // Reference `next` types\n const appTypeDeclarations = path.join(baseDir, 'next-env.d.ts')\n\n // Defaults EOL to system default\n let eol = os.EOL\n let currentContent: string | undefined\n\n try {\n currentContent = await fs.readFile(appTypeDeclarations, 'utf8')\n // If file already exists then preserve its line ending\n const lf = currentContent.indexOf('\\n', /* skip first so we can lf - 1 */ 1)\n\n if (lf !== -1) {\n if (currentContent[lf - 1] === '\\r') {\n eol = '\\r\\n'\n } else {\n eol = '\\n'\n }\n }\n } catch {}\n\n /**\n * \"Triple-slash directives\" used to create typings files for Next.js projects\n * using Typescript .\n *\n * @see https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html\n */\n const lines: string[] = [\n // Include the core Next.js typings.\n '/// ',\n ]\n\n if (imageImportsEnabled) {\n lines.push('/// ')\n }\n\n if (hasAppDir && hasPagesDir) {\n lines.push(\n '/// '\n )\n }\n\n const routeTypesPath = path.posix.join(\n distDir.replaceAll(path.win32.sep, path.posix.sep),\n 'types/routes.d.ts'\n )\n\n // Use ESM import instead of triple-slash reference for better ESLint compatibility\n lines.push(`import \"./${routeTypesPath}\";`)\n\n const rootParamsTypesPath = path.posix.join(\n distDir.replaceAll(path.win32.sep, path.posix.sep),\n 'types/root-params.d.ts'\n )\n lines.push(`import \"./${rootParamsTypesPath}\";`)\n\n if (strictRouteTypes) {\n const cacheLifePath = path.posix.join(\n distDir.replaceAll(path.win32.sep, path.posix.sep),\n 'types/cache-life.d.ts'\n )\n lines.push(`import \"./${cacheLifePath}\";`)\n\n const routeValidatorPath = path.posix.join(\n distDir.replaceAll(path.win32.sep, path.posix.sep),\n 'types/validator.ts'\n )\n lines.push(`import \"./${routeValidatorPath}\";`)\n\n if (typedRoutes === true) {\n const linkTypesPath = path.posix.join(\n distDir.replaceAll(path.win32.sep, path.posix.sep),\n 'types/link.d.ts'\n )\n lines.push(`import \"./${linkTypesPath}\";`)\n }\n }\n\n // Push the notice in.\n lines.push(\n '',\n '// NOTE: This file should not be edited',\n `// see https://nextjs.org/docs/${hasAppDir ? 'app' : 'pages'}/api-reference/config/typescript for more information.`\n )\n\n const content = lines.join(eol) + eol\n\n // Avoids an un-necessary write on read-only fs\n if (currentContent === content) {\n return\n }\n await fs.writeFile(appTypeDeclarations, content)\n}\n"],"names":["os","path","promises","fs","writeAppTypeDeclarations","baseDir","distDir","imageImportsEnabled","hasPagesDir","hasAppDir","strictRouteTypes","typedRoutes","appTypeDeclarations","join","eol","EOL","currentContent","readFile","lf","indexOf","lines","push","routeTypesPath","posix","replaceAll","win32","sep","rootParamsTypesPath","cacheLifePath","routeValidatorPath","linkTypesPath","content","writeFile"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AACvB,SAASC,YAAYC,EAAE,QAAQ,KAAI;AAEnC,OAAO,eAAeC,yBAAyB,EAC7CC,OAAO,EACPC,OAAO,EACPC,mBAAmB,EACnBC,W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AACG,GAAG,GACjD;QAEFN,MAAMC,IAAI,CAAC,CAAC,UAAU,EAAEO,cAAc,EAAE,CAAC;QAEzC,MAAMC,qBAAqB5B,KAAKsB,KAAK,CAACV,IAAI,CACxCP,QAAQkB,UAAU,CAACvB,KAAKwB,KAAK,CAACC,GAAG,EAAEzB,KAAKsB,KAAK,CAACG,GAAG,GACjD;QAEFN,MAAMC,IAAI,CAAC,CAAC,UAAU,EAAEQ,mBAAmB,EAAE,CAAC;QAE9C,IAAIlB,gBAAgB,MAAM;YACxB,MAAMmB,gBAAgB7B,KAAKsB,KAAK,CAACV,IAAI,CACnCP,QAAQkB,UAAU,CAACvB,KAAKwB,KAAK,CAACC,GAAG,EAAEzB,KAAKsB,KAAK,CAACG,GAAG,GACjD;YAEFN,MAAMC,IAAI,CAAC,CAAC,UAAU,EAAES,cAAc,EAAE,CAAC;QAC3C;IACF;IAEA,sBAAsB;IACtBV,MAAMC,IAAI,CACR,IACA,2CACA,CAAC,+BAA+B,EAAEZ,YAAY,QAAQ,QAAQ,sDAAsD,CAAC;IAGvH,MAAMsB,UAAUX,MAAMP,IAAI,CAACC,OAAOA;IAElC,+CAA+C;IAC/C,IAAIE,mBAAmBe,SAAS;QAC9B;IACF;IACA,MAAM5B,GAAG6B,SAAS,CAACpB,qBAAqBmB;AAC1C","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/writeConfigurationDefaults.js b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeConfigurationDefaults.js
new file mode 100644
index 0000000000000000000000000000000000000000..0ab53ff4f31ffc25c85e45c6512a6688293f89c1
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeConfigurationDefaults.js
@@ -0,0 +1,327 @@
+import { readFileSync, writeFileSync } from 'fs';
+import { bold, cyan, white } from '../picocolors';
+import * as CommentJson from 'next/dist/compiled/comment-json';
+import semver from 'next/dist/compiled/semver';
+import os from 'os';
+import { getTypeDefinitionGlobPatterns } from './type-paths';
+import * as Log from '../../build/output/log';
+function getDesiredCompilerOptions(typescriptVersion, userTsConfig) {
+ var _userTsConfig_compilerOptions, _userTsConfig_compilerOptions_module, _userTsConfig_compilerOptions1, _userTsConfig_compilerOptions2;
+ // ModuleKind
+ const moduleKindESNext = 'esnext';
+ const moduleKindES2020 = 'es2020';
+ const moduleKindPreserve = 'preserve';
+ const moduleKindNodeNext = 'nodenext';
+ const moduleKindNode16 = 'node16';
+ const moduleKindCommonJS = 'commonjs';
+ const moduleKindAMD = 'amd';
+ // ModuleResolutionKind
+ const moduleResolutionKindBundler = 'bundler';
+ const moduleResolutionKindNode16 = 'node16';
+ const moduleResolutionKindNodeNext = 'nodenext';
+ const moduleResolutionKindNode12 = 'node12';
+ const moduleResolutionKindNode = 'node';
+ const configuredModule = typeof (userTsConfig == null ? void 0 : (_userTsConfig_compilerOptions = userTsConfig.compilerOptions) == null ? void 0 : _userTsConfig_compilerOptions.module) === 'string' ? userTsConfig.compilerOptions.module.toLowerCase() : undefined;
+ const preferBundlerResolution = semver.gte(typescriptVersion, '5.0.0') && configuredModule !== moduleKindCommonJS && configuredModule !== moduleKindAMD;
+ // Jsx
+ const jsxEmitReactJSX = 'react-jsx';
+ return {
+ target: {
+ suggested: 'ES2017',
+ reason: 'For top-level `await`. Note: Next.js only polyfills for the esmodules target.'
+ },
+ // These are suggested values and will be set when not present in the
+ // tsconfig.json
+ lib: {
+ suggested: [
+ 'dom',
+ 'dom.iterable',
+ 'esnext'
+ ]
+ },
+ allowJs: {
+ suggested: true
+ },
+ skipLibCheck: {
+ suggested: true
+ },
+ strict: {
+ suggested: false
+ },
+ noEmit: {
+ suggested: true
+ },
+ incremental: {
+ suggested: true
+ },
+ // These values are required and cannot be changed by the user
+ // Keep this in sync with the webpack config
+ // 'parsedValue' matches the output value from ts.parseJsonConfigFileContent()
+ module: {
+ parsedValue: moduleKindESNext,
+ // All of these values work:
+ parsedValues: [
+ semver.gte(typescriptVersion, '5.4.0') && moduleKindPreserve,
+ moduleKindES2020,
+ moduleKindESNext,
+ moduleKindCommonJS,
+ moduleKindAMD,
+ moduleKindNodeNext,
+ moduleKindNode16
+ ],
+ value: 'esnext',
+ reason: 'for dynamic import() support'
+ },
+ // TODO: Semver check not needed once Next.js repo uses 5.4.
+ ...semver.gte(typescriptVersion, '5.4.0') && (userTsConfig == null ? void 0 : (_userTsConfig_compilerOptions1 = userTsConfig.compilerOptions) == null ? void 0 : (_userTsConfig_compilerOptions_module = _userTsConfig_compilerOptions1.module) == null ? void 0 : _userTsConfig_compilerOptions_module.toLowerCase()) === moduleKindPreserve ? {
+ } : {
+ esModuleInterop: {
+ value: true,
+ reason: 'requirement for SWC / babel'
+ },
+ moduleResolution: {
+ parsedValue: preferBundlerResolution ? moduleResolutionKindBundler : moduleResolutionKindNode,
+ // All of these values work:
+ parsedValues: preferBundlerResolution ? [
+ moduleResolutionKindNode16,
+ moduleResolutionKindNodeNext,
+ moduleResolutionKindBundler
+ ] : [
+ moduleResolutionKindNode,
+ // only older TypeScript versions have this field
+ moduleResolutionKindNode12,
+ moduleResolutionKindNode16,
+ moduleResolutionKindNodeNext
+ ],
+ value: preferBundlerResolution ? moduleResolutionKindBundler : moduleResolutionKindNode,
+ reason: preferBundlerResolution ? 'to match modern bundler resolution' : 'to match webpack resolution'
+ },
+ resolveJsonModule: {
+ value: true,
+ reason: 'to match webpack resolution'
+ }
+ },
+ ...(userTsConfig == null ? void 0 : (_userTsConfig_compilerOptions2 = userTsConfig.compilerOptions) == null ? void 0 : _userTsConfig_compilerOptions2.verbatimModuleSyntax) === true ? undefined : {
+ isolatedModules: {
+ value: true,
+ reason: 'requirement for SWC / Babel'
+ }
+ },
+ jsx: {
+ parsedValue: jsxEmitReactJSX,
+ value: 'react-jsx',
+ reason: 'next.js uses the React automatic runtime'
+ }
+ };
+}
+export function getRequiredConfiguration(typescript) {
+ const res = {};
+ const typescriptVersion = typescript.version;
+ const desiredCompilerOptions = getDesiredCompilerOptions(typescriptVersion);
+ for (const optionKey of Object.keys(desiredCompilerOptions)){
+ const ev = desiredCompilerOptions[optionKey];
+ if (!('value' in ev)) {
+ continue;
+ }
+ const value = ev.parsedValue ?? ev.value;
+ // Convert string values back to TypeScript enum values
+ if (optionKey === 'module' && typeof value === 'string') {
+ const moduleMap = {
+ esnext: typescript.ModuleKind.ESNext,
+ es2020: typescript.ModuleKind.ES2020,
+ ...typescript.ModuleKind.Preserve !== undefined ? {
+ preserve: typescript.ModuleKind.Preserve
+ } : {},
+ nodenext: typescript.ModuleKind.NodeNext,
+ node16: typescript.ModuleKind.Node16,
+ commonjs: typescript.ModuleKind.CommonJS,
+ amd: typescript.ModuleKind.AMD
+ };
+ res[optionKey] = moduleMap[value.toLowerCase()] ?? value;
+ } else if (optionKey === 'moduleResolution' && typeof value === 'string') {
+ const moduleResolutionMap = {
+ bundler: typescript.ModuleResolutionKind.Bundler,
+ node16: typescript.ModuleResolutionKind.Node16,
+ nodenext: typescript.ModuleResolutionKind.NodeNext,
+ node12: typescript.ModuleResolutionKind.Node12,
+ node: typescript.ModuleResolutionKind.Node10 ?? typescript.ModuleResolutionKind.NodeJs
+ };
+ res[optionKey] = moduleResolutionMap[value.toLowerCase()] ?? value;
+ } else if (optionKey === 'jsx' && typeof value === 'string') {
+ const jsxMap = {
+ 'react-jsx': typescript.JsxEmit.ReactJSX
+ };
+ res[optionKey] = jsxMap[value.toLowerCase()] ?? value;
+ } else {
+ res[optionKey] = value;
+ }
+ }
+ return res;
+}
+const localDevTestFilesExcludeAction = 'NEXT_PRIVATE_LOCAL_DEV_TEST_FILES_EXCLUDE';
+export async function writeConfigurationDefaults(typescriptVersion, tsConfigPath, isFirstTimeSetup, hasAppDir, distDir, hasPagesDir, strictRouteTypes) {
+ var _userTsConfig_compilerOptions;
+ if (isFirstTimeSetup) {
+ writeFileSync(tsConfigPath, '{}' + os.EOL);
+ }
+ const userTsConfigContent = readFileSync(tsConfigPath, 'utf8');
+ const userTsConfig = CommentJson.parse(userTsConfigContent);
+ // Bail automatic setup when the user has extended or referenced another config
+ if ('extends' in userTsConfig || 'references' in userTsConfig) {
+ return;
+ }
+ if ((userTsConfig == null ? void 0 : userTsConfig.compilerOptions) == null) {
+ userTsConfig.compilerOptions = {};
+ isFirstTimeSetup = true;
+ }
+ const desiredCompilerOptions = getDesiredCompilerOptions(typescriptVersion, userTsConfig);
+ const suggestedActions = [];
+ const requiredActions = [];
+ for(const optionKey in desiredCompilerOptions){
+ const check = desiredCompilerOptions[optionKey];
+ if ('suggested' in check) {
+ if (!(optionKey in (userTsConfig == null ? void 0 : userTsConfig.compilerOptions))) {
+ userTsConfig.compilerOptions[optionKey] = check.suggested;
+ suggestedActions.push(cyan(optionKey) + ' was set to ' + bold(check.suggested) + (check.reason ? ` (${check.reason})` : ''));
+ }
+ } else if ('value' in check) {
+ var _userTsConfig_compilerOptions1;
+ let existingValue = userTsConfig == null ? void 0 : (_userTsConfig_compilerOptions1 = userTsConfig.compilerOptions) == null ? void 0 : _userTsConfig_compilerOptions1[optionKey];
+ if (typeof existingValue === 'string') {
+ existingValue = existingValue.toLowerCase();
+ }
+ const shouldWriteRequiredValue = ()=>{
+ // Check if the option has multiple allowed values
+ if (check.parsedValues) {
+ return !check.parsedValues.includes(existingValue);
+ }
+ // Check if the option has a single parsed value
+ if (check.parsedValue) {
+ return check.parsedValue !== existingValue;
+ }
+ // Fall back to direct value comparison
+ return check.value !== existingValue;
+ };
+ if (shouldWriteRequiredValue()) {
+ if (!userTsConfig.compilerOptions) {
+ userTsConfig.compilerOptions = {};
+ }
+ userTsConfig.compilerOptions[optionKey] = check.value;
+ requiredActions.push(cyan(optionKey) + ' was set to ' + bold(check.value) + ` (${check.reason})`);
+ }
+ } else {
+ const _ = check;
+ }
+ }
+ // Get type definition glob patterns using shared utility to ensure consistency
+ // with other TypeScript infrastructure (e.g., runTypeCheck.ts)
+ const nextTypes = getTypeDefinitionGlobPatterns(distDir);
+ if (!('include' in userTsConfig)) {
+ const defaultInclude = hasAppDir && !strictRouteTypes ? [
+ 'next-env.d.ts',
+ ...nextTypes,
+ '**/*.mts',
+ '**/*.ts',
+ '**/*.tsx'
+ ] : [
+ 'next-env.d.ts',
+ '**/*.mts',
+ '**/*.ts',
+ '**/*.tsx'
+ ];
+ userTsConfig.include = defaultInclude;
+ suggestedActions.push(cyan('include') + ' was set to [' + bold(defaultInclude.map((type)=>`'${type}'`).join(', ')) + ']');
+ } else if (hasAppDir && !strictRouteTypes) {
+ const missingFromResolved = [];
+ for (const type of nextTypes){
+ if (!userTsConfig.include.includes(type)) {
+ missingFromResolved.push(type);
+ }
+ }
+ if (missingFromResolved.length > 0) {
+ if (!Array.isArray(userTsConfig.include)) {
+ userTsConfig.include = [];
+ }
+ missingFromResolved.forEach((item)=>{
+ userTsConfig.include.push(item);
+ suggestedActions.push(cyan('include') + ' was updated to add ' + bold(`'${item}'`));
+ });
+ }
+ }
+ // Enable the Next.js typescript plugin.
+ if (hasAppDir) {
+ var _userTsConfig_compilerOptions2;
+ // Check if the config or the resolved config has the plugin already.
+ const plugins = [
+ ...Array.isArray(userTsConfig == null ? void 0 : userTsConfig.plugins) ? userTsConfig.plugins : [],
+ ...userTsConfig.compilerOptions && Array.isArray(userTsConfig.compilerOptions.plugins) ? userTsConfig.compilerOptions.plugins : []
+ ];
+ const hasNextPlugin = plugins.some(({ name })=>name === 'next');
+ // If the TS config extends on another config, we can't add the `plugin` field
+ // because that will override the parent config's plugins.
+ // Instead we have to show a message to the user to add the plugin manually.
+ if (!userTsConfig.compilerOptions || plugins.length && !hasNextPlugin && 'extends' in userTsConfig && (!userTsConfig.compilerOptions || !userTsConfig.compilerOptions.plugins)) {
+ Log.info(`\nYour ${bold('tsconfig.json')} extends another configuration, which means we cannot add the Next.js TypeScript plugin automatically. To improve your development experience, we recommend adding the Next.js plugin (\`${cyan('"plugins": [{ "name": "next" }]')}\`) manually to your TypeScript configuration. Learn more: https://nextjs.org/docs/app/api-reference/config/typescript#the-typescript-plugin\n`);
+ } else if (!hasNextPlugin) {
+ if (!('plugins' in userTsConfig.compilerOptions)) {
+ userTsConfig.compilerOptions.plugins = [];
+ }
+ userTsConfig.compilerOptions.plugins.push({
+ name: 'next'
+ });
+ suggestedActions.push(cyan('plugins') + ' was updated to add ' + bold(`{ name: 'next' }`));
+ }
+ // If `strict` is set to `false` and `strictNullChecks` is set to `false`,
+ // then set `strictNullChecks` to `true`.
+ if (hasPagesDir && hasAppDir && !(userTsConfig == null ? void 0 : (_userTsConfig_compilerOptions2 = userTsConfig.compilerOptions) == null ? void 0 : _userTsConfig_compilerOptions2.strict) && !('strictNullChecks' in (userTsConfig == null ? void 0 : userTsConfig.compilerOptions))) {
+ userTsConfig.compilerOptions.strictNullChecks = true;
+ suggestedActions.push(cyan('strictNullChecks') + ' was set to ' + bold(`true`));
+ }
+ }
+ if (!('exclude' in userTsConfig)) {
+ userTsConfig.exclude = [
+ 'node_modules'
+ ];
+ suggestedActions.push(cyan('exclude') + ' was set to ' + bold(`['node_modules']`));
+ }
+ // During local development inside Next.js repo, exclude the test files coverage by the local tsconfig
+ if (process.env.NEXT_PRIVATE_LOCAL_DEV && userTsConfig.exclude) {
+ const tsGlob = '**/*.test.ts';
+ const tsxGlob = '**/*.test.tsx';
+ let hasUpdates = false;
+ if (!userTsConfig.exclude.includes(tsGlob)) {
+ userTsConfig.exclude.push(tsGlob);
+ hasUpdates = true;
+ }
+ if (!userTsConfig.exclude.includes(tsxGlob)) {
+ userTsConfig.exclude.push(tsxGlob);
+ hasUpdates = true;
+ }
+ if (hasUpdates) {
+ requiredActions.push(localDevTestFilesExcludeAction);
+ }
+ }
+ if (suggestedActions.length < 1 && requiredActions.length < 1) {
+ return;
+ }
+ writeFileSync(tsConfigPath, CommentJson.stringify(userTsConfig, null, 2) + os.EOL);
+ Log.info('');
+ if (isFirstTimeSetup) {
+ Log.info(`We detected TypeScript in your project and created a ${cyan('tsconfig.json')} file for you.`);
+ return;
+ }
+ Log.info(`We detected TypeScript in your project and reconfigured your ${cyan('tsconfig.json')} file for you.${((_userTsConfig_compilerOptions = userTsConfig.compilerOptions) == null ? void 0 : _userTsConfig_compilerOptions.strict) ? '' : ` Strict-mode is set to ${cyan('false')} by default.`}`);
+ if (suggestedActions.length) {
+ Log.info(`The following suggested values were added to your ${cyan('tsconfig.json')}. These values ${cyan('can be changed')} to fit your project's needs:\n`);
+ suggestedActions.forEach((action)=>Log.info(`\t- ${action}`));
+ Log.info('');
+ }
+ const requiredActionsToBeLogged = process.env.NEXT_PRIVATE_LOCAL_DEV ? requiredActions.filter((action)=>action !== localDevTestFilesExcludeAction) : requiredActions;
+ if (requiredActionsToBeLogged.length) {
+ Log.info(`The following ${white('mandatory changes')} were made to your ${cyan('tsconfig.json')}:\n`);
+ requiredActionsToBeLogged.forEach((action)=>Log.info(`\t- ${action}`));
+ Log.info('');
+ }
+}
+
+//# sourceMappingURL=writeConfigurationDefaults.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/typescript/writeConfigurationDefaults.js.map b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeConfigurationDefaults.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..174ee618c651762929dedaff9a852530d3e6e470
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/typescript/writeConfigurationDefaults.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/typescript/writeConfigurationDefaults.ts"],"sourcesContent":["import { readFileSync, writeFileSync } from 'fs'\nimport { bold, cyan, white } from '../picocolors'\nimport * as CommentJson from 'next/dist/compiled/comment-json'\nimport semver from 'next/dist/compiled/semver'\nimport os from 'os'\nimport type { CompilerOptions } from 'typescript'\nimport { getTypeDefinitionGlobPatterns } from './type-paths'\nimport * as Log from '../../build/output/log'\n\ntype DesiredCompilerOptionsShape = {\n [K in keyof CompilerOptions]:\n | { suggested: any; reason?: string }\n | {\n parsedValue?: any\n parsedValues?: Array\n value: any\n reason: string\n }\n}\n\nfunction getDesiredCompilerOptions(\n typescriptVersion: string,\n userTsConfig?: Record\n): DesiredCompilerOptionsShape {\n // ModuleKind\n const moduleKindESNext = 'esnext'\n const moduleKindES2020 = 'es2020'\n const moduleKindPreserve = 'preserve'\n const moduleKindNodeNext = 'nodenext'\n const moduleKindNode16 = 'node16'\n const moduleKindCommonJS = 'commonjs'\n const moduleKindAMD = 'amd'\n\n // ModuleResolutionKind\n const moduleResolutionKindBundler = 'bundler'\n const moduleResolutionKindNode16 = 'node16'\n const moduleResolutionKindNodeNext = 'nodenext'\n const moduleResolutionKindNode12 = 'node12'\n const moduleResolutionKindNode = 'node'\n const configuredModule =\n typeof userTsConfig?.compilerOptions?.module === 'string'\n ? userTsConfig.compilerOptions.module.toLowerCase()\n : undefined\n const preferBundlerResolution =\n semver.gte(typescriptVersion, '5.0.0') &&\n configuredModule !== moduleKindCommonJS &&\n configuredModule !== moduleKindAMD\n\n // Jsx\n const jsxEmitReactJSX = 'react-jsx'\n\n return {\n target: {\n suggested: 'ES2017',\n reason:\n 'For top-level `await`. Note: Next.js only polyfills for the esmodules target.',\n },\n // These are suggested values and will be set when not present in the\n // tsconfig.json\n lib: { suggested: ['dom', 'dom.iterable', 'esnext'] },\n allowJs: { suggested: true },\n skipLibCheck: { suggested: true },\n strict: { suggested: false },\n noEmit: { suggested: true },\n incremental: { suggested: true },\n\n // These values are required and cannot be changed by the user\n // Keep this in sync with the webpack config\n // 'parsedValue' matches the output value from ts.parseJsonConfigFileContent()\n module: {\n parsedValue: moduleKindESNext,\n // All of these values work:\n parsedValues: [\n semver.gte(typescriptVersion, '5.4.0') && moduleKindPreserve,\n moduleKindES2020,\n moduleKindESNext,\n moduleKindCommonJS,\n moduleKindAMD,\n moduleKindNodeNext,\n moduleKindNode16,\n ],\n value: 'esnext',\n reason: 'for dynamic import() support',\n },\n // TODO: Semver check not needed once Next.js repo uses 5.4.\n ...(semver.gte(typescriptVersion, '5.4.0') &&\n userTsConfig?.compilerOptions?.module?.toLowerCase() === moduleKindPreserve\n ? {\n // TypeScript 5.4 introduced `Preserve`. Using `Preserve` implies\n // - `moduleResolution` is `Bundler`\n // - `esModuleInterop` is `true`\n // - `resolveJsonModule` is `true`\n // This means that if the user is using Preserve, they don't need these options\n }\n : {\n esModuleInterop: {\n value: true,\n reason: 'requirement for SWC / babel',\n },\n moduleResolution: {\n parsedValue: preferBundlerResolution\n ? moduleResolutionKindBundler\n : moduleResolutionKindNode,\n // All of these values work:\n parsedValues: preferBundlerResolution\n ? [\n moduleResolutionKindNode16,\n moduleResolutionKindNodeNext,\n moduleResolutionKindBundler,\n ]\n : [\n moduleResolutionKindNode,\n // only older TypeScript versions have this field\n moduleResolutionKindNode12,\n moduleResolutionKindNode16,\n moduleResolutionKindNodeNext,\n ],\n value: preferBundlerResolution\n ? moduleResolutionKindBundler\n : moduleResolutionKindNode,\n reason: preferBundlerResolution\n ? 'to match modern bundler resolution'\n : 'to match webpack resolution',\n },\n resolveJsonModule: {\n value: true,\n reason: 'to match webpack resolution',\n },\n }),\n ...(userTsConfig?.compilerOptions?.verbatimModuleSyntax === true\n ? undefined\n : {\n isolatedModules: {\n value: true,\n reason: 'requirement for SWC / Babel',\n },\n }),\n jsx: {\n parsedValue: jsxEmitReactJSX,\n value: 'react-jsx',\n reason: 'next.js uses the React automatic runtime',\n },\n } satisfies DesiredCompilerOptionsShape\n}\n\nexport function getRequiredConfiguration(\n typescript: typeof import('typescript')\n): Partial {\n const res: Partial = {}\n const typescriptVersion = typescript.version\n\n const desiredCompilerOptions = getDesiredCompilerOptions(typescriptVersion)\n for (const optionKey of Object.keys(desiredCompilerOptions)) {\n const ev = desiredCompilerOptions[optionKey]\n if (!('value' in ev)) {\n continue\n }\n\n const value = ev.parsedValue ?? ev.value\n\n // Convert string values back to TypeScript enum values\n if (optionKey === 'module' && typeof value === 'string') {\n const moduleMap: Record = {\n esnext: typescript.ModuleKind.ESNext,\n es2020: typescript.ModuleKind.ES2020,\n ...(typescript.ModuleKind.Preserve !== undefined\n ? { preserve: typescript.ModuleKind.Preserve }\n : {}),\n nodenext: typescript.ModuleKind.NodeNext,\n node16: typescript.ModuleKind.Node16,\n commonjs: typescript.ModuleKind.CommonJS,\n amd: typescript.ModuleKind.AMD,\n }\n res[optionKey] = moduleMap[value.toLowerCase()] ?? value\n } else if (optionKey === 'moduleResolution' && typeof value === 'string') {\n const moduleResolutionMap: Record<\n string,\n import('typescript').ModuleResolutionKind\n > = {\n bundler: typescript.ModuleResolutionKind.Bundler,\n node16: typescript.ModuleResolutionKind.Node16,\n nodenext: typescript.ModuleResolutionKind.NodeNext,\n node12: (typescript.ModuleResolutionKind as any).Node12,\n node:\n (typescript.ModuleResolutionKind as any).Node10 ??\n typescript.ModuleResolutionKind.NodeJs,\n }\n res[optionKey] = moduleResolutionMap[value.toLowerCase()] ?? value\n } else if (optionKey === 'jsx' && typeof value === 'string') {\n const jsxMap: Record = {\n 'react-jsx': typescript.JsxEmit.ReactJSX,\n }\n res[optionKey] = jsxMap[value.toLowerCase()] ?? value\n } else {\n res[optionKey] = value\n }\n }\n\n return res\n}\n\nconst localDevTestFilesExcludeAction =\n 'NEXT_PRIVATE_LOCAL_DEV_TEST_FILES_EXCLUDE'\n\nexport async function writeConfigurationDefaults(\n typescriptVersion: string,\n tsConfigPath: string,\n isFirstTimeSetup: boolean,\n hasAppDir: boolean,\n distDir: string,\n hasPagesDir: boolean,\n strictRouteTypes: boolean\n): Promise {\n if (isFirstTimeSetup) {\n writeFileSync(tsConfigPath, '{}' + os.EOL)\n }\n\n const userTsConfigContent = readFileSync(tsConfigPath, 'utf8')\n const userTsConfig = CommentJson.parse(userTsConfigContent)\n\n // Bail automatic setup when the user has extended or referenced another config\n if ('extends' in userTsConfig || 'references' in userTsConfig) {\n return\n }\n\n if (userTsConfig?.compilerOptions == null) {\n userTsConfig.compilerOptions = {}\n isFirstTimeSetup = true\n }\n\n const desiredCompilerOptions = getDesiredCompilerOptions(\n typescriptVersion,\n userTsConfig\n )\n\n const suggestedActions: string[] = []\n const requiredActions: string[] = []\n for (const optionKey in desiredCompilerOptions) {\n const check = desiredCompilerOptions[optionKey]\n if ('suggested' in check) {\n if (!(optionKey in userTsConfig?.compilerOptions)) {\n userTsConfig.compilerOptions[optionKey] = check.suggested\n suggestedActions.push(\n cyan(optionKey) +\n ' was set to ' +\n bold(check.suggested) +\n (check.reason ? ` (${check.reason})` : '')\n )\n }\n } else if ('value' in check) {\n let existingValue = userTsConfig?.compilerOptions?.[optionKey]\n\n if (typeof existingValue === 'string') {\n existingValue = existingValue.toLowerCase()\n }\n\n const shouldWriteRequiredValue = () => {\n // Check if the option has multiple allowed values\n if (check.parsedValues) {\n return !check.parsedValues.includes(existingValue)\n }\n\n // Check if the option has a single parsed value\n if (check.parsedValue) {\n return check.parsedValue !== existingValue\n }\n\n // Fall back to direct value comparison\n return check.value !== existingValue\n }\n\n if (shouldWriteRequiredValue()) {\n if (!userTsConfig.compilerOptions) {\n userTsConfig.compilerOptions = {}\n }\n userTsConfig.compilerOptions[optionKey] = check.value\n requiredActions.push(\n cyan(optionKey) +\n ' was set to ' +\n bold(check.value) +\n ` (${check.reason})`\n )\n }\n } else {\n const _: never = check\n }\n }\n\n // Get type definition glob patterns using shared utility to ensure consistency\n // with other TypeScript infrastructure (e.g., runTypeCheck.ts)\n const nextTypes = getTypeDefinitionGlobPatterns(distDir)\n\n if (!('include' in userTsConfig)) {\n const defaultInclude =\n hasAppDir && !strictRouteTypes\n ? ['next-env.d.ts', ...nextTypes, '**/*.mts', '**/*.ts', '**/*.tsx']\n : ['next-env.d.ts', '**/*.mts', '**/*.ts', '**/*.tsx']\n\n userTsConfig.include = defaultInclude\n suggestedActions.push(\n cyan('include') +\n ' was set to [' +\n bold(defaultInclude.map((type) => `'${type}'`).join(', ')) +\n ']'\n )\n } else if (hasAppDir && !strictRouteTypes) {\n const missingFromResolved = []\n for (const type of nextTypes) {\n if (!userTsConfig.include.includes(type)) {\n missingFromResolved.push(type)\n }\n }\n\n if (missingFromResolved.length > 0) {\n if (!Array.isArray(userTsConfig.include)) {\n userTsConfig.include = []\n }\n\n missingFromResolved.forEach((item) => {\n userTsConfig.include.push(item)\n suggestedActions.push(\n cyan('include') + ' was updated to add ' + bold(`'${item}'`)\n )\n })\n }\n }\n\n // Enable the Next.js typescript plugin.\n if (hasAppDir) {\n // Check if the config or the resolved config has the plugin already.\n const plugins = [\n ...(Array.isArray(userTsConfig?.plugins) ? userTsConfig.plugins : []),\n ...(userTsConfig.compilerOptions &&\n Array.isArray(userTsConfig.compilerOptions.plugins)\n ? userTsConfig.compilerOptions.plugins\n : []),\n ]\n const hasNextPlugin = plugins.some(\n ({ name }: { name: string }) => name === 'next'\n )\n\n // If the TS config extends on another config, we can't add the `plugin` field\n // because that will override the parent config's plugins.\n // Instead we have to show a message to the user to add the plugin manually.\n if (\n !userTsConfig.compilerOptions ||\n (plugins.length &&\n !hasNextPlugin &&\n 'extends' in userTsConfig &&\n (!userTsConfig.compilerOptions ||\n !userTsConfig.compilerOptions.plugins))\n ) {\n Log.info(\n `\\nYour ${bold(\n 'tsconfig.json'\n )} extends another configuration, which means we cannot add the Next.js TypeScript plugin automatically. To improve your development experience, we recommend adding the Next.js plugin (\\`${cyan(\n '\"plugins\": [{ \"name\": \"next\" }]'\n )}\\`) manually to your TypeScript configuration. Learn more: https://nextjs.org/docs/app/api-reference/config/typescript#the-typescript-plugin\\n`\n )\n } else if (!hasNextPlugin) {\n if (!('plugins' in userTsConfig.compilerOptions)) {\n userTsConfig.compilerOptions.plugins = []\n }\n userTsConfig.compilerOptions.plugins.push({ name: 'next' })\n suggestedActions.push(\n cyan('plugins') + ' was updated to add ' + bold(`{ name: 'next' }`)\n )\n }\n\n // If `strict` is set to `false` and `strictNullChecks` is set to `false`,\n // then set `strictNullChecks` to `true`.\n if (\n hasPagesDir &&\n hasAppDir &&\n !userTsConfig?.compilerOptions?.strict &&\n !('strictNullChecks' in userTsConfig?.compilerOptions)\n ) {\n userTsConfig.compilerOptions.strictNullChecks = true\n suggestedActions.push(\n cyan('strictNullChecks') + ' was set to ' + bold(`true`)\n )\n }\n }\n\n if (!('exclude' in userTsConfig)) {\n userTsConfig.exclude = ['node_modules']\n suggestedActions.push(\n cyan('exclude') + ' was set to ' + bold(`['node_modules']`)\n )\n }\n\n // During local development inside Next.js repo, exclude the test files coverage by the local tsconfig\n if (process.env.NEXT_PRIVATE_LOCAL_DEV && userTsConfig.exclude) {\n const tsGlob = '**/*.test.ts'\n const tsxGlob = '**/*.test.tsx'\n let hasUpdates = false\n if (!userTsConfig.exclude.includes(tsGlob)) {\n userTsConfig.exclude.push(tsGlob)\n hasUpdates = true\n }\n if (!userTsConfig.exclude.includes(tsxGlob)) {\n userTsConfig.exclude.push(tsxGlob)\n hasUpdates = true\n }\n\n if (hasUpdates) {\n requiredActions.push(localDevTestFilesExcludeAction)\n }\n }\n\n if (suggestedActions.length < 1 && requiredActions.length < 1) {\n return\n }\n\n writeFileSync(\n tsConfigPath,\n CommentJson.stringify(userTsConfig, null, 2) + os.EOL\n )\n\n Log.info('')\n if (isFirstTimeSetup) {\n Log.info(\n `We detected TypeScript in your project and created a ${cyan(\n 'tsconfig.json'\n )} file for you.`\n )\n return\n }\n\n Log.info(\n `We detected TypeScript in your project and reconfigured your ${cyan(\n 'tsconfig.json'\n )} file for you.${\n userTsConfig.compilerOptions?.strict\n ? ''\n : ` Strict-mode is set to ${cyan('false')} by default.`\n }`\n )\n\n if (suggestedActions.length) {\n Log.info(\n `The following suggested values were added to your ${cyan(\n 'tsconfig.json'\n )}. These values ${cyan('can be changed')} to fit your project's needs:\\n`\n )\n\n suggestedActions.forEach((action) => Log.info(`\\t- ${action}`))\n\n Log.info('')\n }\n\n const requiredActionsToBeLogged = process.env.NEXT_PRIVATE_LOCAL_DEV\n ? requiredActions.filter(\n (action) => action !== localDevTestFilesExcludeAction\n )\n : requiredActions\n\n if (requiredActionsToBeLogged.length) {\n Log.info(\n `The following ${white('mandatory changes')} were made to your ${cyan(\n 'tsconfig.json'\n )}:\\n`\n )\n\n requiredActionsToBeLogged.forEach((action) => Log.info(`\\t- ${action}`))\n\n Log.info('')\n }\n}\n"],"names":["readFileSync","writeFileSync","bold","cyan","white","CommentJson","semver","os","getTypeDefinitionGlobPatterns","Log","getDesiredCompilerOptions","typescriptVersion","userTsConfig","moduleKindESNext","moduleKindES2020","moduleKindPreserve","moduleKindNodeNext","moduleKindNode16","moduleKindCommonJS","moduleKindAMD","moduleResolutionKindBundler","moduleResolutionKindNode16","moduleResolutionKindNodeNext","moduleResolutionKindNode12","moduleResolutionKindNode","configuredModule","compilerOptions","module","toLowerCase","undefined","preferBundlerResolution","gte","jsxEmitReactJSX","target","suggested","reason","lib","allowJs","skipLibCheck","strict","noEmit","incremental","parsedValue","parsedValues","value","esModuleInterop","moduleResolution","resolveJsonModule","verbatimModuleSyntax","isolatedModules","jsx","getRequiredConfiguration","typescript","res","version","desiredCompilerOptions","optionKey","Object","keys","ev","moduleMap","esnext","ModuleKind","ESNext","es2020","ES2020","Preserve","preserve","nodenext","NodeNext","node16","Node16","commonjs","CommonJS","amd","AMD","moduleResolutionMap","bundler","ModuleResolutionKind","Bundler","node12","Node12","node","Node10","NodeJs","jsxMap","JsxEmit","ReactJSX","localDevTestFilesExcludeAction","writeConfigurationDefaults","tsConfigPath","isFirstTimeSetup","hasAppDir","distDir","hasPagesDir","strictRouteTypes","EOL","userTsConfigContent","parse","suggestedActions","requiredActions","check","push","existingValue","shouldWriteRequiredValue","includes","_","nextTypes","defaultInclude","include","map","type","join","missingFromResolved","length","Array","isArray","forEach","item","plugins","hasNextPlugin","some","name","info","strictNullChecks","exclude","process","env","NEXT_PRIVATE_LOCAL_DEV","tsGlob","tsxGlob","hasUpdates","stringify","action","requiredActionsToBeLogged","filter"],"mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,KAAI;AAChD,SAASC,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,gBAAe;AACjD,YAAYC,iBAAiB,kCAAiC;AAC9D,OAAOC,YAAY,4BAA2B;AA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qDAAqD,EAAExH,KACtD,iBACA,cAAc,CAAC;QAEnB;IACF;IAEAM,IAAIkH,IAAI,CACN,CAAC,6DAA6D,EAAExH,KAC9D,iBACA,cAAc,EACdS,EAAAA,gCAAAA,aAAac,eAAe,qBAA5Bd,8BAA8B2B,MAAM,IAChC,KACA,CAAC,uBAAuB,EAAEpC,KAAK,SAAS,YAAY,CAAC,EACzD;IAGJ,IAAIgG,iBAAiBe,MAAM,EAAE;QAC3BzG,IAAIkH,IAAI,CACN,CAAC,kDAAkD,EAAExH,KACnD,iBACA,eAAe,EAAEA,KAAK,kBAAkB,+BAA+B,CAAC;QAG5EgG,iBAAiBkB,OAAO,CAAC,CAACgB,SAAW5H,IAAIkH,IAAI,CAAC,CAAC,IAAI,EAAEU,QAAQ;QAE7D5H,IAAIkH,IAAI,CAAC;IACX;IAEA,MAAMW,4BAA4BR,QAAQC,GAAG,CAACC,sBAAsB,GAChE5B,gBAAgBmC,MAAM,CACpB,CAACF,SAAWA,WAAW7C,kCAEzBY;IAEJ,IAAIkC,0BAA0BpB,MAAM,EAAE;QACpCzG,IAAIkH,IAAI,CACN,CAAC,cAAc,EAAEvH,MAAM,qBAAqB,mBAAmB,EAAED,KAC/D,iBACA,GAAG,CAAC;QAGRmI,0BAA0BjB,OAAO,CAAC,CAACgB,SAAW5H,IAAIkH,IAAI,CAAC,CAAC,IAAI,EAAEU,QAAQ;QAEtE5H,IAAIkH,IAAI,CAAC;IACX;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/future-defaults.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/future-defaults.js
new file mode 100644
index 0000000000000000000000000000000000000000..c6a6b9c9d238aa0c76e3a6f487a13e7992ada3c9
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/future-defaults.js
@@ -0,0 +1,29 @@
+import semver from 'next/dist/compiled/semver';
+import { findDir } from '../find-pages-dir';
+export const futureDefaults = [
+ // TODO: Add `partialPrefetching` after the Cache Components Future Default
+ // workflow is proven end to end.
+ {
+ name: 'Cache Components',
+ availableSince: '16.3.0',
+ isAdopted: (config)=>config.cacheComponents === true,
+ adoptionDoc: [
+ 'docs/01-app/02-guides/migrating-to-cache-components.md',
+ 'skills/next-cache-components-adoption/SKILL.md'
+ ],
+ optimizationDoc: [
+ 'skills/next-cache-components-optimizer/SKILL.md'
+ ],
+ // TODO: Support Pages -> App migration before offering adoption to Pages-only apps.
+ isApplicable: (directory)=>findDir(directory, 'app') !== null
+ }
+];
+export function getPendingFutureDefaults(directory, config, version) {
+ var _semver_prerelease;
+ if (!semver.valid(version) || semver.prerelease(version) && ((_semver_prerelease = semver.prerelease(version)) == null ? void 0 : _semver_prerelease[0]) !== 'canary') {
+ return [];
+ }
+ return futureDefaults.filter((entry)=>semver.gte(version, entry.availableSince) && !entry.isAdopted(config) && entry.isApplicable(directory));
+}
+
+//# sourceMappingURL=future-defaults.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/future-defaults.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/future-defaults.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..7e951a1ad85f1ec1596d30ba02acb100799c3546
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/future-defaults.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/future-defaults.ts"],"sourcesContent":["import type { NextConfigComplete } from '../../server/config-shared'\nimport semver from 'next/dist/compiled/semver'\nimport { findDir } from '../find-pages-dir'\n\nexport type UpgradeDocument = `docs/${string}.md` | `skills/${string}/SKILL.md`\n\ntype FutureDefault = {\n name: string\n availableSince: string\n isAdopted(config: Pick): boolean\n adoptionDoc: readonly UpgradeDocument[]\n optimizationDoc: readonly UpgradeDocument[]\n isApplicable(directory: string): boolean\n}\n\nexport const futureDefaults = [\n // TODO: Add `partialPrefetching` after the Cache Components Future Default\n // workflow is proven end to end.\n {\n name: 'Cache Components',\n availableSince: '16.3.0',\n isAdopted: (config) => config.cacheComponents === true,\n adoptionDoc: [\n 'docs/01-app/02-guides/migrating-to-cache-components.md',\n 'skills/next-cache-components-adoption/SKILL.md',\n ],\n optimizationDoc: ['skills/next-cache-components-optimizer/SKILL.md'],\n // TODO: Support Pages -> App migration before offering adoption to Pages-only apps.\n isApplicable: (directory) => findDir(directory, 'app') !== null,\n },\n] as const satisfies readonly FutureDefault[]\n\nexport type FutureDefaultEntry = (typeof futureDefaults)[number]\n\nexport function getPendingFutureDefaults(\n directory: string,\n config: Pick,\n version: string\n) {\n if (\n !semver.valid(version) ||\n (semver.prerelease(version) && semver.prerelease(version)?.[0] !== 'canary')\n ) {\n return []\n }\n return futureDefaults.filter(\n (entry) =>\n semver.gte(version, entry.availableSince) &&\n !entry.isAdopted(config) &&\n entry.isApplicable(directory)\n )\n}\n"],"names":["semver","findDir","futureDefaults","name","availableSince","isAdopted","config","cacheComponents","adoptionDoc","optimizationDoc","isApplicable","directory","getPendingFutureDefaults","version","valid","prerelease","filter","entry","gte"],"mappings":"AACA,OAAOA,YAAY,4BAA2B;AAC9C,SAASC,OAAO,QAAQ,oBAAmB;AAa3C,OAAO,MAAMC,iBAAiB;IAC5B,2EAA2E;IAC3E,iCAAiC;IACjC;QACEC,MAAM;QACNC,gBAAgB;QAChBC,WAAW,CAACC,SAAWA,OAAOC,eAAe,KAAK;QAClDC,aAAa;YACX;YACA;SACD;QACDC,iBAAiB;YAAC;SAAkD;QACpE,oFAAoF;QACpFC,cAAc,CAACC,YAAcV,QAAQU,WAAW,WAAW;IAC7D;CACD,CAA4C;AAI7C,OAAO,SAASC,yBACdD,SAAiB,EACjBL,MAAmD,EACnDO,OAAe;QAIkBb;IAFjC,IACE,CAACA,OAAOc,KAAK,CAACD,YACbb,OAAOe,UAAU,CAACF,YAAYb,EAAAA,qBAAAA,OAAOe,UAAU,CAACF,6BAAlBb,kBAA4B,CAAC,EAAE,MAAK,UACnE;QACA,OAAO,EAAE;IACX;IACA,OAAOE,eAAec,MAAM,CAC1B,CAACC,QACCjB,OAAOkB,GAAG,CAACL,SAASI,MAAMb,cAAc,KACxC,CAACa,MAAMZ,SAAS,CAACC,WACjBW,MAAMP,YAAY,CAACC;AAEzB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/harness.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/harness.js
new file mode 100644
index 0000000000000000000000000000000000000000..f7e60633df9acb6ac29bda98a0e94ffb69205c32
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/harness.js
@@ -0,0 +1,402 @@
+import { constants } from 'fs';
+import { access, stat } from 'fs/promises';
+import { delimiter, resolve } from 'path';
+import cliSelect from 'next/dist/compiled/cli-select';
+import spawn from 'next/dist/compiled/cross-spawn';
+import * as Log from '../../build/output/log';
+import { getAgentName } from '../../telemetry/agent-name';
+import { bold, cyan, dim } from '../picocolors';
+import { getHarnessModels } from './model-discovery';
+import { runChildProcess } from './run-child-process';
+const CODEX_APPROVAL_ARGS = [
+ '--sandbox',
+ 'workspace-write',
+ '--ask-for-approval',
+ 'on-request'
+];
+function resolvePrompt(prompt, useWorktree) {
+ return typeof prompt === 'string' ? prompt : prompt(useWorktree);
+}
+async function chooseOption(question, values, defaultValue, firstPrompt = false) {
+ Log.bootstrap('');
+ Log.bootstrap(` ${question}`);
+ Log.bootstrap(` ${dim(`Use ↑/↓ to choose, Enter to confirm, or Esc to ${firstPrompt ? 'cancel' : 'go back'}.`)}\n`);
+ let interrupted = false;
+ const onKeypress = (_text, key)=>{
+ if (key.ctrl && key.name === 'c') {
+ interrupted = true;
+ }
+ };
+ process.stdin.on('keypress', onKeypress);
+ try {
+ const { id } = await cliSelect({
+ values,
+ defaultValue,
+ selected: cyan('❯'),
+ unselected: ' ',
+ indentation: 2,
+ valueRenderer: (value, selected)=>selected ? cyan(bold(value)) : value
+ });
+ if (typeof id === 'string') {
+ Log.bootstrap(` ${cyan('❯')} ${cyan(bold(values[id]))}`);
+ return id;
+ }
+ return undefined;
+ } catch (error) {
+ if (error !== undefined) {
+ throw error;
+ }
+ return interrupted ? null : undefined;
+ } finally{
+ process.stdin.removeListener('keypress', onKeypress);
+ }
+}
+async function chooseWorktree() {
+ const choice = await chooseOption('Open the upgrade in a separate Git worktree?', {
+ yes: 'Yes',
+ no: 'No'
+ }, 0);
+ if (choice === null || choice === undefined) {
+ return choice;
+ }
+ if (choice === 'yes') {
+ return true;
+ }
+ if (choice === 'no') {
+ return false;
+ }
+ throw new Error(`Unknown worktree choice: ${choice}`);
+}
+function getHarnessDisplayName(name) {
+ return name === 'codex' ? 'Codex' : 'Claude Code';
+}
+function supportsCodexAutoReview(path) {
+ const result = spawn.sync(path, [
+ '--help'
+ ], {
+ encoding: 'utf8',
+ timeout: 5000
+ });
+ return result.status === 0 && /--approve-for-me\b/.test(result.stdout ?? '');
+}
+function getClaudePermissionSupport(path) {
+ var _result_stdout_match, _result_stdout, _permissionModeHelp_match;
+ const result = spawn.sync(path, [
+ '--help'
+ ], {
+ encoding: 'utf8',
+ timeout: 5000
+ });
+ const permissionModeHelp = result.status === 0 ? (_result_stdout = result.stdout) == null ? void 0 : (_result_stdout_match = _result_stdout.match(/--permission-mode[^\n]*(?:\n[ \t]{8,}[^\n]*){0,4}/)) == null ? void 0 : _result_stdout_match[0] : null;
+ const choices = permissionModeHelp == null ? void 0 : (_permissionModeHelp_match = permissionModeHelp.match(/\(choices:\s*([^)]+)\)/)) == null ? void 0 : _permissionModeHelp_match[1];
+ const supportedModes = new Set((choices == null ? void 0 : choices.match(/[A-Za-z]+/g)) ?? []);
+ return {
+ auto: supportedModes.has('auto'),
+ approvalMode: supportedModes.has('manual') ? 'manual' : supportedModes.has('default') ? 'default' : null
+ };
+}
+async function findHarnesses() {
+ const names = [
+ 'codex',
+ 'claude'
+ ];
+ const directories = (process.env.PATH ?? '').split(delimiter).filter(Boolean);
+ const extensions = process.platform === 'win32' ? (process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM').split(';').filter(Boolean) : [
+ ''
+ ];
+ // Probe agents independently, preserving menu order and each detected path.
+ const installed = await Promise.all(names.map(async (name)=>{
+ for (const directory of directories){
+ for (const extension of extensions){
+ const file = resolve(directory, `${name}${extension}`);
+ try {
+ await access(file, process.platform === 'win32' ? constants.F_OK : constants.X_OK);
+ if ((await stat(file)).isFile()) {
+ return {
+ name,
+ path: file
+ };
+ }
+ } catch (error) {
+ const code = error.code;
+ if (code === 'ENOENT' || code === 'EACCES' || code === 'ENOTDIR' || code === 'ELOOP') {
+ continue;
+ }
+ throw new Error(`Could not inspect coding agent at ${file}.`, {
+ cause: error
+ });
+ }
+ }
+ }
+ return null;
+ }));
+ return installed.filter((harness)=>harness !== null);
+}
+async function chooseHarness(harnesses, previousName) {
+ const question = harnesses.length === 1 ? `${getHarnessDisplayName(harnesses[0].name)} detected. Would you like to proceed?` : 'Multiple coding agents detected. Which one would you like to use?';
+ const id = await chooseOption(question, {
+ ...Object.fromEntries(harnesses.map(({ name })=>[
+ name,
+ `Continue with ${getHarnessDisplayName(name)}`
+ ])),
+ copy: 'Copy prompt for another coding agent'
+ }, Math.max(0, harnesses.findIndex(({ name })=>name === previousName)), true);
+ return id === 'copy' ? 'copy' : harnesses.find(({ name })=>name === id);
+}
+function copyUpgradePrompt(prompt, noHarness) {
+ const commands = process.platform === 'darwin' ? [
+ [
+ 'pbcopy'
+ ]
+ ] : process.platform === 'win32' ? [
+ [
+ 'clip.exe'
+ ]
+ ] : [
+ [
+ 'wl-copy'
+ ],
+ [
+ 'xclip',
+ '-selection',
+ 'clipboard'
+ ],
+ [
+ 'xsel',
+ '--clipboard',
+ '--input'
+ ]
+ ];
+ for (const [command, ...args] of commands){
+ const result = spawn.sync(command, args, {
+ input: process.platform === 'win32' ? Buffer.from(prompt, 'utf16le') : prompt,
+ stdio: [
+ 'pipe',
+ 'ignore',
+ 'ignore'
+ ],
+ timeout: 1000,
+ windowsHide: true
+ });
+ if (!result.error && result.status === 0) {
+ Log.info(noHarness ? 'No supported coding agent found. The upgrade prompt was copied to your clipboard.' : 'Upgrade prompt copied. Paste it into your coding agent.');
+ return 'copied_prompt';
+ }
+ }
+ Log.info(noHarness ? 'No supported coding agent found. Copy this upgrade prompt:' : 'Could not access the clipboard. Copy this upgrade prompt:');
+ Log.bootstrap(prompt);
+ return 'printed_prompt';
+}
+function launchHarness(harness, prompt, directory, model, effort, permissionArgs, onSpawn) {
+ // Windows shell shims cannot carry literal line breaks in an argument.
+ if (process.platform === 'win32' && /\.(cmd|bat)$/i.test(harness.path)) {
+ prompt = prompt.replace(/[\r\n]+/g, ' ');
+ }
+ const args = model === null ? [] : [
+ '--model',
+ model
+ ];
+ if (effort !== 'default') {
+ if (harness.name === 'codex') {
+ args.push('-c', `model_reasoning_effort=${effort}`);
+ } else {
+ args.push('--effort', effort);
+ }
+ }
+ args.push(...permissionArgs);
+ args.push(prompt);
+ return runChildProcess(harness.path, args, {
+ cwd: directory,
+ stdio: 'inherit'
+ }, onSpawn);
+}
+export async function handoffUpgrade(prompt, directory, onHandoff) {
+ // Existing agents keep their session and permissions.
+ const existingAgent = await getAgentName();
+ if (existingAgent) {
+ Log.bootstrap(resolvePrompt(prompt, null));
+ onHandoff == null ? void 0 : onHandoff('existing_agent', existingAgent);
+ return 'handed_off';
+ }
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
+ Log.info('Copy this upgrade prompt into your coding agent:');
+ Log.bootstrap(resolvePrompt(prompt, null));
+ onHandoff == null ? void 0 : onHandoff('printed_prompt', null);
+ return 'handed_off';
+ }
+ Log.info(dim('Looking for coding agents...'));
+ const installed = await findHarnesses();
+ if (installed.length === 0) {
+ const method = copyUpgradePrompt(resolvePrompt(prompt, null), true);
+ onHandoff == null ? void 0 : onHandoff(method, null);
+ return 'handed_off';
+ }
+ const discoveryController = new AbortController();
+ const modelCatalogs = new Map(installed.map(({ name, path })=>[
+ name,
+ getHarnessModels(name, path, directory, discoveryController.signal)
+ ]));
+ const stopDiscovery = async ()=>{
+ discoveryController.abort();
+ await Promise.all(modelCatalogs.values());
+ };
+ try {
+ let stage = 'harness';
+ let harness;
+ let model;
+ let effort;
+ let autoPermissionArgs = null;
+ let approvalPermissionArgs = [];
+ let permissionArgs = [];
+ let useAuto = true;
+ let useWorktree = true;
+ const previousModelStage = ()=>model ? model.efforts.length > 0 ? 'effort' : 'model' : 'harness';
+ let codexAutoReview;
+ let claudePermissionSupport;
+ while(true){
+ if (stage === 'harness') {
+ const choice = await chooseHarness(installed, harness == null ? void 0 : harness.name);
+ if (choice === 'copy') {
+ const method = copyUpgradePrompt(resolvePrompt(prompt, null), false);
+ onHandoff == null ? void 0 : onHandoff(method, null);
+ return 'handed_off';
+ }
+ if (!choice) {
+ break;
+ }
+ harness = choice;
+ stage = 'model';
+ } else if (stage === 'model') {
+ const models = await modelCatalogs.get(harness.name);
+ if (models === null) {
+ break;
+ }
+ if (models.length === 0) {
+ model = undefined;
+ effort = 'default';
+ stage = 'effort';
+ continue;
+ }
+ const selectedModelId = model == null ? void 0 : model.id;
+ const previousModelId = models.some(({ id })=>id === selectedModelId) ? selectedModelId : undefined;
+ const modelId = await chooseOption(`Which ${getHarnessDisplayName(harness.name)} model should run the upgrade?`, Object.fromEntries(models.map(({ id, label, description })=>[
+ id,
+ description ? `${label} — ${description}` : label
+ ])), Math.max(0, models.findIndex(({ id, isDefault })=>previousModelId ? id === previousModelId : isDefault)));
+ if (modelId === null) {
+ break;
+ }
+ if (modelId === undefined) {
+ stage = 'harness';
+ continue;
+ }
+ model = models.find(({ id })=>id === modelId);
+ if (!model) {
+ throw new Error(`Unknown upgrade model: ${modelId}`);
+ }
+ if (!model.efforts.includes(effort ?? 'default')) {
+ effort = 'default';
+ }
+ stage = 'effort';
+ } else if (stage === 'effort') {
+ if (model && model.efforts.length > 0) {
+ const efforts = [
+ 'default',
+ ...model.efforts
+ ];
+ const previousEffortIndex = efforts.indexOf(effort ?? 'default');
+ const selectedEffort = await chooseOption('Which reasoning effort should the upgrade use?', Object.fromEntries(efforts.map((value)=>[
+ value,
+ value === 'default' ? 'Model default' : value
+ ])), Math.max(0, previousEffortIndex));
+ if (selectedEffort === null) {
+ break;
+ }
+ if (selectedEffort === undefined) {
+ stage = 'model';
+ continue;
+ }
+ if (!efforts.includes(selectedEffort)) {
+ throw new Error(`Unknown upgrade effort: ${selectedEffort}`);
+ }
+ effort = selectedEffort;
+ }
+ if (harness.name === 'codex') {
+ codexAutoReview ??= supportsCodexAutoReview(harness.path);
+ autoPermissionArgs = codexAutoReview ? [
+ '--approve-for-me'
+ ] : null;
+ approvalPermissionArgs = [
+ ...CODEX_APPROVAL_ARGS
+ ];
+ } else {
+ const { auto, approvalMode } = claudePermissionSupport ??= getClaudePermissionSupport(harness.path);
+ if (!approvalMode) {
+ Log.error('Could not determine a supported Claude approval mode.');
+ process.exitCode = 1;
+ return 'failed';
+ }
+ autoPermissionArgs = auto ? [
+ '--permission-mode',
+ 'auto'
+ ] : null;
+ approvalPermissionArgs = [
+ '--permission-mode',
+ approvalMode
+ ];
+ }
+ if (autoPermissionArgs) {
+ stage = 'permission';
+ } else {
+ Log.info(dim('Auto permission mode is unavailable; using approval requests.'));
+ permissionArgs = approvalPermissionArgs;
+ stage = 'worktree';
+ }
+ } else if (stage === 'permission') {
+ const permissionChoice = await chooseOption(`Use Auto permission mode for ${getHarnessDisplayName(harness.name)}?`, {
+ yes: 'Yes',
+ no: 'No, ask for approval'
+ }, useAuto ? 0 : 1);
+ if (permissionChoice === null) {
+ break;
+ }
+ if (permissionChoice === undefined) {
+ stage = previousModelStage();
+ continue;
+ }
+ useAuto = permissionChoice === 'yes';
+ permissionArgs = useAuto ? autoPermissionArgs : approvalPermissionArgs;
+ stage = 'worktree';
+ } else {
+ const choice = await chooseWorktree();
+ if (choice === null) {
+ break;
+ }
+ if (choice === undefined) {
+ stage = autoPermissionArgs ? 'permission' : previousModelStage();
+ continue;
+ }
+ useWorktree = choice;
+ Log.bootstrap(` Continuing with ${cyan(bold(getHarnessDisplayName(harness.name)))}...\n`);
+ // Capture the selected agent before the launch callback runs.
+ const agentProduct = harness.name;
+ await stopDiscovery();
+ try {
+ process.exitCode = await launchHarness(harness, resolvePrompt(prompt, useWorktree), directory, (model == null ? void 0 : model.id) ?? null, effort, permissionArgs, ()=>onHandoff == null ? void 0 : onHandoff('launched_agent', agentProduct));
+ } catch {
+ Log.error(`Could not start ${getHarnessDisplayName(harness.name)}.`);
+ process.exitCode = 1;
+ return 'failed';
+ }
+ return 'handed_off';
+ }
+ }
+ Log.bootstrap(` ${dim('Upgrade cancelled.')}\n`);
+ process.exitCode = 1;
+ return 'cancelled';
+ } finally{
+ await stopDiscovery();
+ }
+}
+
+//# sourceMappingURL=harness.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/harness.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/harness.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ba2a38bfe753e284160b33420e34dd30cf57069a
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/harness.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/harness.ts"],"sourcesContent":["import { constants } from 'fs'\nimport { access, stat } from 'fs/promises'\nimport { delimiter, resolve } from 'path'\nimport type { Key } from 'readline'\n\nimport cliSelect from 'next/dist/compiled/cli-select'\nimport spawn from 'next/dist/compiled/cross-spawn'\n\nimport * as Log from '../../build/output/log'\nimport { getAgentName } from '../../telemetry/agent-name'\nimport type { AgentUpgradeHandoffMethod } from '../../telemetry/events/agent-upgrade'\nimport { bold, cyan, dim } from '../picocolors'\nimport { getHarnessModels, type UpgradeModel } from './model-discovery'\nimport { runChildProcess } from './run-child-process'\n\nconst CODEX_APPROVAL_ARGS = [\n '--sandbox',\n 'workspace-write',\n '--ask-for-approval',\n 'on-request',\n] as const\n\ntype UpgradeHarness = {\n name: 'codex' | 'claude'\n path: string\n}\n\ntype UpgradePrompt = string | ((useWorktree: boolean | null) => string)\n\nfunction resolvePrompt(\n prompt: UpgradePrompt,\n useWorktree: boolean | null\n): string {\n return typeof prompt === 'string' ? prompt : prompt(useWorktree)\n}\n\nasync function chooseOption(\n question: string,\n values: Record,\n defaultValue: number,\n firstPrompt = false\n): Promise {\n Log.bootstrap('')\n Log.bootstrap(` ${question}`)\n Log.bootstrap(\n ` ${dim(`Use ↑/↓ to choose, Enter to confirm, or Esc to ${firstPrompt ? 'cancel' : 'go back'}.`)}\\n`\n )\n\n let interrupted = false\n const onKeypress = (_text: string, key: Key) => {\n if (key.ctrl && key.name === 'c') {\n interrupted = true\n }\n }\n process.stdin.on('keypress', onKeypress)\n try {\n const { id } = await cliSelect({\n values,\n defaultValue,\n selected: cyan('❯'),\n unselected: ' ',\n indentation: 2,\n valueRenderer: (value: string, selected: boolean) =>\n selected ? cyan(bold(value)) : value,\n })\n if (typeof id === 'string') {\n Log.bootstrap(` ${cyan('❯')} ${cyan(bold(values[id]))}`)\n return id\n }\n return undefined\n } catch (error) {\n if (error !== undefined) {\n throw error\n }\n return interrupted ? null : undefined\n } finally {\n process.stdin.removeListener('keypress', onKeypress)\n }\n}\n\nasync function chooseWorktree(): Promise {\n const choice = await chooseOption(\n 'Open the upgrade in a separate Git worktree?',\n { yes: 'Yes', no: 'No' },\n 0\n )\n if (choice === null || choice === undefined) {\n return choice\n }\n if (choice === 'yes') {\n return true\n }\n if (choice === 'no') {\n return false\n }\n throw new Error(`Unknown worktree choice: ${choice}`)\n}\n\nfunction getHarnessDisplayName(name: UpgradeHarness['name']): string {\n return name === 'codex' ? 'Codex' : 'Claude Code'\n}\n\nfunction supportsCodexAutoReview(path: string): boolean {\n const result = spawn.sync(path, ['--help'], {\n encoding: 'utf8',\n timeout: 5000,\n })\n return result.status === 0 && /--approve-for-me\\b/.test(result.stdout ?? '')\n}\n\nfunction getClaudePermissionSupport(path: string) {\n const result = spawn.sync(path, ['--help'], {\n encoding: 'utf8',\n timeout: 5000,\n })\n const permissionModeHelp =\n result.status === 0\n ? result.stdout?.match(\n /--permission-mode[^\\n]*(?:\\n[ \\t]{8,}[^\\n]*){0,4}/\n )?.[0]\n : null\n const choices = permissionModeHelp?.match(/\\(choices:\\s*([^)]+)\\)/)?.[1]\n const supportedModes = new Set(choices?.match(/[A-Za-z]+/g) ?? [])\n\n return {\n auto: supportedModes.has('auto'),\n approvalMode: supportedModes.has('manual')\n ? 'manual'\n : supportedModes.has('default')\n ? 'default'\n : null,\n }\n}\n\nasync function findHarnesses(): Promise {\n const names: UpgradeHarness['name'][] = ['codex', 'claude']\n const directories = (process.env.PATH ?? '').split(delimiter).filter(Boolean)\n const extensions =\n process.platform === 'win32'\n ? (process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')\n .split(';')\n .filter(Boolean)\n : ['']\n\n // Probe agents independently, preserving menu order and each detected path.\n const installed = await Promise.all(\n names.map(async (name): Promise => {\n for (const directory of directories) {\n for (const extension of extensions) {\n const file = resolve(directory, `${name}${extension}`)\n\n try {\n await access(\n file,\n process.platform === 'win32' ? constants.F_OK : constants.X_OK\n )\n\n if ((await stat(file)).isFile()) {\n return { name, path: file }\n }\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code\n if (\n code === 'ENOENT' ||\n code === 'EACCES' ||\n code === 'ENOTDIR' ||\n code === 'ELOOP'\n ) {\n continue\n }\n throw new Error(`Could not inspect coding agent at ${file}.`, {\n cause: error,\n })\n }\n }\n }\n\n return null\n })\n )\n\n return installed.filter(\n (harness): harness is UpgradeHarness => harness !== null\n )\n}\n\nasync function chooseHarness(\n harnesses: UpgradeHarness[],\n previousName: UpgradeHarness['name'] | undefined\n): Promise {\n const question =\n harnesses.length === 1\n ? `${getHarnessDisplayName(harnesses[0].name)} detected. Would you like to proceed?`\n : 'Multiple coding agents detected. Which one would you like to use?'\n\n const id = await chooseOption(\n question,\n {\n ...Object.fromEntries(\n harnesses.map(({ name }) => [\n name,\n `Continue with ${getHarnessDisplayName(name)}`,\n ])\n ),\n copy: 'Copy prompt for another coding agent',\n },\n Math.max(\n 0,\n harnesses.findIndex(({ name }) => name === previousName)\n ),\n true\n )\n return id === 'copy' ? 'copy' : harnesses.find(({ name }) => name === id)\n}\n\nfunction copyUpgradePrompt(\n prompt: string,\n noHarness: boolean\n): AgentUpgradeHandoffMethod {\n const commands =\n process.platform === 'darwin'\n ? [['pbcopy']]\n : process.platform === 'win32'\n ? [['clip.exe']]\n : [\n ['wl-copy'],\n ['xclip', '-selection', 'clipboard'],\n ['xsel', '--clipboard', '--input'],\n ]\n\n for (const [command, ...args] of commands) {\n const result = spawn.sync(command, args, {\n input:\n process.platform === 'win32' ? Buffer.from(prompt, 'utf16le') : prompt,\n stdio: ['pipe', 'ignore', 'ignore'],\n timeout: 1000,\n windowsHide: true,\n })\n\n if (!result.error && result.status === 0) {\n Log.info(\n noHarness\n ? 'No supported coding agent found. The upgrade prompt was copied to your clipboard.'\n : 'Upgrade prompt copied. Paste it into your coding agent.'\n )\n return 'copied_prompt'\n }\n }\n\n Log.info(\n noHarness\n ? 'No supported coding agent found. Copy this upgrade prompt:'\n : 'Could not access the clipboard. Copy this upgrade prompt:'\n )\n Log.bootstrap(prompt)\n return 'printed_prompt'\n}\n\nfunction launchHarness(\n harness: UpgradeHarness,\n prompt: string,\n directory: string,\n model: string | null,\n effort: string,\n permissionArgs: readonly string[],\n onSpawn: () => void\n): Promise {\n // Windows shell shims cannot carry literal line breaks in an argument.\n if (process.platform === 'win32' && /\\.(cmd|bat)$/i.test(harness.path)) {\n prompt = prompt.replace(/[\\r\\n]+/g, ' ')\n }\n\n const args = model === null ? [] : ['--model', model]\n if (effort !== 'default') {\n if (harness.name === 'codex') {\n args.push('-c', `model_reasoning_effort=${effort}`)\n } else {\n args.push('--effort', effort)\n }\n }\n args.push(...permissionArgs)\n args.push(prompt)\n return runChildProcess(\n harness.path,\n args,\n {\n cwd: directory,\n stdio: 'inherit',\n },\n onSpawn\n )\n}\n\nexport async function handoffUpgrade(\n prompt: UpgradePrompt,\n directory: string,\n onHandoff:\n | ((\n method: AgentUpgradeHandoffMethod,\n selectedAgentProduct: string | null\n ) => void)\n | null\n): Promise<'handed_off' | 'cancelled' | 'failed'> {\n // Existing agents keep their session and permissions.\n const existingAgent = await getAgentName()\n if (existingAgent) {\n Log.bootstrap(resolvePrompt(prompt, null))\n onHandoff?.('existing_agent', existingAgent)\n return 'handed_off'\n }\n\n if (!process.stdin.isTTY || !process.stdout.isTTY) {\n Log.info('Copy this upgrade prompt into your coding agent:')\n Log.bootstrap(resolvePrompt(prompt, null))\n onHandoff?.('printed_prompt', null)\n return 'handed_off'\n }\n\n Log.info(dim('Looking for coding agents...'))\n const installed = await findHarnesses()\n\n if (installed.length === 0) {\n const method = copyUpgradePrompt(resolvePrompt(prompt, null), true)\n onHandoff?.(method, null)\n return 'handed_off'\n }\n\n const discoveryController = new AbortController()\n const modelCatalogs = new Map(\n installed.map(({ name, path }) => [\n name,\n getHarnessModels(name, path, directory, discoveryController.signal),\n ])\n )\n const stopDiscovery = async () => {\n discoveryController.abort()\n await Promise.all(modelCatalogs.values())\n }\n\n try {\n let stage: 'harness' | 'model' | 'effort' | 'permission' | 'worktree' =\n 'harness'\n let harness: UpgradeHarness | undefined\n let model: UpgradeModel | undefined\n let effort: string | undefined\n let autoPermissionArgs: string[] | null = null\n let approvalPermissionArgs: string[] = []\n let permissionArgs: string[] = []\n let useAuto = true\n let useWorktree = true\n const previousModelStage = () =>\n model ? (model.efforts.length > 0 ? 'effort' : 'model') : 'harness'\n let codexAutoReview: boolean | undefined\n let claudePermissionSupport:\n | ReturnType\n | undefined\n\n while (true) {\n if (stage === 'harness') {\n const choice = await chooseHarness(installed, harness?.name)\n if (choice === 'copy') {\n const method = copyUpgradePrompt(resolvePrompt(prompt, null), false)\n onHandoff?.(method, null)\n return 'handed_off'\n }\n if (!choice) {\n break\n }\n harness = choice\n stage = 'model'\n } else if (stage === 'model') {\n const models = await modelCatalogs.get(harness!.name)!\n if (models === null) {\n break\n }\n if (models.length === 0) {\n model = undefined\n effort = 'default'\n stage = 'effort'\n continue\n }\n const selectedModelId = model?.id\n const previousModelId = models.some(({ id }) => id === selectedModelId)\n ? selectedModelId\n : undefined\n const modelId = await chooseOption(\n `Which ${getHarnessDisplayName(harness!.name)} model should run the upgrade?`,\n Object.fromEntries(\n models.map(({ id, label, description }) => [\n id,\n description ? `${label} — ${description}` : label,\n ])\n ),\n Math.max(\n 0,\n models.findIndex(({ id, isDefault }) =>\n previousModelId ? id === previousModelId : isDefault\n )\n )\n )\n if (modelId === null) {\n break\n }\n if (modelId === undefined) {\n stage = 'harness'\n continue\n }\n model = models.find(({ id }) => id === modelId)\n if (!model) {\n throw new Error(`Unknown upgrade model: ${modelId}`)\n }\n if (!model.efforts.includes(effort ?? 'default')) {\n effort = 'default'\n }\n stage = 'effort'\n } else if (stage === 'effort') {\n if (model && model.efforts.length > 0) {\n const efforts = ['default', ...model.efforts]\n const previousEffortIndex = efforts.indexOf(effort ?? 'default')\n const selectedEffort = await chooseOption(\n 'Which reasoning effort should the upgrade use?',\n Object.fromEntries(\n efforts.map((value) => [\n value,\n value === 'default' ? 'Model default' : value,\n ])\n ),\n Math.max(0, previousEffortIndex)\n )\n if (selectedEffort === null) {\n break\n }\n if (selectedEffort === undefined) {\n stage = 'model'\n continue\n }\n if (!efforts.includes(selectedEffort)) {\n throw new Error(`Unknown upgrade effort: ${selectedEffort}`)\n }\n effort = selectedEffort\n }\n if (harness!.name === 'codex') {\n codexAutoReview ??= supportsCodexAutoReview(harness!.path)\n autoPermissionArgs = codexAutoReview ? ['--approve-for-me'] : null\n approvalPermissionArgs = [...CODEX_APPROVAL_ARGS]\n } else {\n const { auto, approvalMode } = (claudePermissionSupport ??=\n getClaudePermissionSupport(harness!.path))\n if (!approvalMode) {\n Log.error('Could not determine a supported Claude approval mode.')\n process.exitCode = 1\n return 'failed'\n }\n autoPermissionArgs = auto ? ['--permission-mode', 'auto'] : null\n approvalPermissionArgs = ['--permission-mode', approvalMode]\n }\n if (autoPermissionArgs) {\n stage = 'permission'\n } else {\n Log.info(\n dim('Auto permission mode is unavailable; using approval requests.')\n )\n permissionArgs = approvalPermissionArgs\n stage = 'worktree'\n }\n } else if (stage === 'permission') {\n const permissionChoice = await chooseOption(\n `Use Auto permission mode for ${getHarnessDisplayName(harness!.name)}?`,\n { yes: 'Yes', no: 'No, ask for approval' },\n useAuto ? 0 : 1\n )\n if (permissionChoice === null) {\n break\n }\n if (permissionChoice === undefined) {\n stage = previousModelStage()\n continue\n }\n useAuto = permissionChoice === 'yes'\n permissionArgs = useAuto ? autoPermissionArgs! : approvalPermissionArgs\n stage = 'worktree'\n } else {\n const choice = await chooseWorktree()\n if (choice === null) {\n break\n }\n if (choice === undefined) {\n stage = autoPermissionArgs ? 'permission' : previousModelStage()\n continue\n }\n useWorktree = choice\n Log.bootstrap(\n ` Continuing with ${cyan(bold(getHarnessDisplayName(harness!.name)))}...\\n`\n )\n // Capture the selected agent before the launch callback runs.\n const agentProduct = harness!.name\n await stopDiscovery()\n\n try {\n process.exitCode = await launchHarness(\n harness!,\n resolvePrompt(prompt, useWorktree),\n directory,\n model?.id ?? null,\n effort!,\n permissionArgs,\n () => onHandoff?.('launched_agent', agentProduct)\n )\n } catch {\n Log.error(`Could not start ${getHarnessDisplayName(harness!.name)}.`)\n process.exitCode = 1\n return 'failed'\n }\n return 'handed_off'\n }\n }\n\n Log.bootstrap(` ${dim('Upgrade cancelled.')}\\n`)\n process.exitCode = 1\n return 'cancelled'\n } finally {\n await stopDiscovery()\n }\n}\n"],"names":["constants","access","stat","delimiter","resolve","cliSelect","spawn","Log","getAgentName","bold","cyan","dim","getHarnessModels","runChildProcess","CODEX_APPROVAL_ARGS","resolvePrompt","prompt","useWorktree","chooseOption","question","values","defaultValue","firstPrompt","bootstrap","interrupted","onKeypress","_text","key","ctrl","name","process","stdin","on","id","selected","unselected","indentation","valueRenderer","value","undefined","error","removeListener","chooseWorktree","choice","yes","no","Error","getHarnessDisplayName","supportsCodexAutoReview","path","result","sync","encoding","timeout","status","test","stdout","getClaudePermissionSupport","permissionModeHelp","match","choices","supportedModes","Set","auto","has","approvalMode","findHarnesses","names","directories","env","PATH","split","filter","Boolean","extensions","platform","PATHEXT","installed","Promise","all","map","directory","extension","file","F_OK","X_OK","isFile","code","cause","harness","chooseHarness","harnesses","previousName","length","Object","fromEntries","copy","Math","max","findIndex","find","copyUpgradePrompt","noHarness","commands","command","args","input","Buffer","from","stdio","windowsHide","info","launchHarness","model","effort","permissionArgs","onSpawn","replace","push","cwd","handoffUpgrade","onHandoff","existingAgent","isTTY","method","discoveryController","AbortController","modelCatalogs","Map","signal","stopDiscovery","abort","stage","autoPermissionArgs","approvalPermissionArgs","useAuto","previousModelStage","efforts","codexAutoReview","claudePermissionSupport","models","get","selectedModelId","previousModelId","some","modelId","label","description","isDefault","includes","previousEffortIndex","indexOf","selectedEffort","exitCode","permissionChoice","agentProduct"],"mappings":"AAAA,SAASA,SAAS,QAAQ,KAAI;AAC9B,SAASC,MAAM,EAAEC,IAAI,QAAQ,cAAa;AAC1C,SAASC,SAAS,EAAEC,OAAO,QAAQ,OAAM;AAGzC,OAAOC,eAAe,gCAA+B;AACrD,OAAOC,WAAW,iCAAgC;AAElD,YAAYC,SAAS,yBAAwB;AAC7C,SAASC,YAAY,QAAQ,6BAA4B;AAEzD,SAASC,IAAI,EAAEC,IAAI,EAAEC,GAAG,QAAQ,gBAAe;AAC/C,SAASC,gBAAgB,QAA2B,oBAAmB;AACvE,SAASC,eAAe,QAAQ,sBAAqB;AAErD,MAAMC,sBAAsB;IAC1B;IACA;IACA;IACA;CACD;AASD,SAASC,cACPC,MAAqB,EACrBC,WAA2B;IAE3B,OAAO,OAAOD,WAAW,WAAWA,SAASA,OAAOC;AACtD;AAEA,eAAeC,aACbC,QAAgB,EAChBC,MAA8B,EAC9BC,YAAoB,EACpBC,cAAc,KAAK;IAEnBf,IAAIgB,SAAS,CAAC;IACdhB,IAAIgB,SAAS,CAAC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;gBAEN,IAAI;oBACFpG,QAAQ2H,QAAQ,GAAG,MAAMzC,cACvBvB,SACA1E,cAAcC,QAAQC,cACtBgE,WACAgC,CAAAA,yBAAAA,MAAOhF,EAAE,KAAI,MACbiF,QACAC,gBACA,IAAMM,6BAAAA,UAAY,kBAAkBkC;gBAExC,EAAE,OAAM;oBACNpJ,IAAIiC,KAAK,CAAC,CAAC,gBAAgB,EAAEO,sBAAsB0C,QAAS5D,IAAI,EAAE,CAAC,CAAC;oBACpEC,QAAQ2H,QAAQ,GAAG;oBACnB,OAAO;gBACT;gBACA,OAAO;YACT;QACF;QAEAlJ,IAAIgB,SAAS,CAAC,CAAC,EAAE,EAAEZ,IAAI,sBAAsB,EAAE,CAAC;QAChDmB,QAAQ2H,QAAQ,GAAG;QACnB,OAAO;IACT,SAAU;QACR,MAAMvB;IACR;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/model-discovery.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/model-discovery.js
new file mode 100644
index 0000000000000000000000000000000000000000..7f8265c2311ce1c6a5f33f73e6040881bed57c92
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/model-discovery.js
@@ -0,0 +1,228 @@
+import { randomUUID } from 'crypto';
+import spawn from 'next/dist/compiled/cross-spawn';
+import createDebug from 'next/dist/compiled/debug';
+const debug = createDebug('next:upgrade');
+function record(value) {
+ return value !== null && typeof value === 'object' && !Array.isArray(value) ? value : {};
+}
+function string(value) {
+ return typeof value === 'string' ? value : '';
+}
+function efforts(value) {
+ return Array.isArray(value) ? [
+ ...new Set(value.map(string).filter((level)=>level && level !== 'default'))
+ ] : [];
+}
+function parseModels(value, parse) {
+ if (!Array.isArray(value)) {
+ throw new Error('unexpected model catalog format');
+ }
+ return value.map((entry)=>parse(record(entry))).filter((model)=>model !== null);
+}
+export function getCodexModels(path, cwd, signal) {
+ return discoverModels('codex', path, [
+ 'app-server'
+ ], cwd, signal, (send, complete)=>{
+ const initializeId = randomUUID();
+ let listId;
+ const models = [];
+ const cursors = new Set();
+ const list = (cursor)=>{
+ listId = randomUUID();
+ send({
+ id: listId,
+ method: 'model/list',
+ params: {
+ includeHidden: false,
+ ...cursor ? {
+ cursor
+ } : {}
+ }
+ });
+ };
+ return {
+ initialize () {
+ send({
+ id: initializeId,
+ method: 'initialize',
+ params: {
+ clientInfo: {
+ name: 'next_upgrade',
+ version: '1'
+ }
+ }
+ });
+ },
+ receive (message) {
+ if (message.id !== initializeId && (listId === undefined || message.id !== listId)) return;
+ if (message.error) throw new Error('CLI returned a protocol error');
+ if (message.id === initializeId) {
+ if (!message.result) throw new Error('missing initialization result');
+ send({
+ method: 'initialized'
+ });
+ list();
+ return;
+ }
+ const response = record(message.result);
+ models.push(...parseModels(response.data, (model)=>{
+ const id = string(model.model);
+ if (!id || model.hidden === true) return null;
+ return {
+ id,
+ label: string(model.displayName) || id,
+ description: string(model.description),
+ efforts: efforts(Array.isArray(model.supportedReasoningEfforts) ? model.supportedReasoningEfforts.map((level)=>record(level).reasoningEffort) : undefined),
+ isDefault: model.isDefault === true
+ };
+ }));
+ const cursor = response.nextCursor;
+ if (cursor !== null && cursor !== undefined) {
+ if (typeof cursor !== 'string' || !cursor || cursors.has(cursor)) {
+ throw new Error('invalid pagination cursor');
+ }
+ cursors.add(cursor);
+ list(cursor);
+ return;
+ }
+ complete(models);
+ }
+ };
+ });
+}
+export function getClaudeModels(path, cwd, signal) {
+ return discoverModels('claude', path, [
+ '-p',
+ '--input-format',
+ 'stream-json',
+ '--output-format',
+ 'stream-json',
+ '--verbose',
+ '--no-session-persistence'
+ ], cwd, signal, (send, complete)=>{
+ const initializeId = randomUUID();
+ return {
+ initialize () {
+ send({
+ type: 'control_request',
+ request_id: initializeId,
+ request: {
+ subtype: 'initialize'
+ }
+ });
+ },
+ receive (message) {
+ if (message.type !== 'control_response') return;
+ const response = record(message.response);
+ if (response.request_id !== initializeId) return;
+ if (response.subtype !== 'success') throw new Error('CLI returned an initialization error');
+ complete(parseModels(record(response.response).models, (model)=>{
+ const id = string(model.value);
+ if (!id) return null;
+ return {
+ id,
+ label: string(model.displayName) || id,
+ description: string(model.description),
+ efforts: model.supportsEffort === false ? [] : efforts(model.supportedEffortLevels),
+ isDefault: id === 'default'
+ };
+ }));
+ }
+ };
+ });
+}
+export function getHarnessModels(name, path, cwd, signal) {
+ return name === 'codex' ? getCodexModels(path, cwd, signal) : getClaudeModels(path, cwd, signal);
+}
+// null means discovery was cancelled, rather than an unavailable catalog.
+async function discoverModels(name, path, args, cwd, signal, createProtocol) {
+ if (signal == null ? void 0 : signal.aborted) return null;
+ let child;
+ try {
+ child = spawn(path, args, {
+ cwd,
+ stdio: 'pipe'
+ });
+ } catch {
+ debug('%s model discovery failed: could not start CLI', name);
+ return [];
+ }
+ return new Promise((resolve)=>{
+ var _child_stdout, _child_stdout1, // Drain stderr, but never log raw CLI output (which may contain credentials).
+ _child_stderr, _child_stdin;
+ let buffer = '';
+ let bytes = 0;
+ let stopping = false;
+ let result = [];
+ let killTimer;
+ const stop = (value, reason)=>{
+ var _child_stdin;
+ if (stopping) return;
+ stopping = true;
+ result = value;
+ clearTimeout(timeout);
+ if (reason) debug('%s model discovery failed: %s', name, reason);
+ (_child_stdin = child.stdin) == null ? void 0 : _child_stdin.end();
+ child.kill('SIGTERM');
+ killTimer = setTimeout(()=>child.kill('SIGKILL'), 250);
+ };
+ const timeout = setTimeout(()=>stop([], 'timed out'), 5000);
+ const interrupt = ()=>stop(null);
+ process.on('SIGINT', interrupt);
+ process.on('SIGTERM', interrupt);
+ process.on('SIGHUP', interrupt);
+ const send = (message)=>{
+ var _child_stdin;
+ if (!stopping) (_child_stdin = child.stdin) == null ? void 0 : _child_stdin.write(JSON.stringify(message) + '\n');
+ };
+ const protocol = createProtocol(send, (models)=>{
+ const unique = [
+ ...new Map(models.map((model)=>[
+ model.id,
+ model
+ ])).values()
+ ];
+ stop(unique, unique.length ? undefined : 'no usable models');
+ });
+ signal == null ? void 0 : signal.addEventListener('abort', interrupt, {
+ once: true
+ });
+ const countOutput = (chunk)=>{
+ bytes += Buffer.byteLength(chunk);
+ if (bytes > 20 * 1024 * 1024) stop([], 'output limit exceeded');
+ };
+ (_child_stdout = child.stdout) == null ? void 0 : _child_stdout.setEncoding('utf8');
+ (_child_stdout1 = child.stdout) == null ? void 0 : _child_stdout1.on('data', (chunk)=>{
+ countOutput(chunk);
+ if (stopping) return;
+ buffer += chunk;
+ let newline;
+ while(!stopping && (newline = buffer.indexOf('\n')) !== -1){
+ const line = buffer.slice(0, newline).trim();
+ buffer = buffer.slice(newline + 1);
+ if (!line) continue;
+ try {
+ protocol.receive(record(JSON.parse(line)));
+ } catch {
+ stop([], 'invalid discovery response');
+ }
+ }
+ });
+ (_child_stderr = child.stderr) == null ? void 0 : _child_stderr.on('data', countOutput);
+ (_child_stdin = child.stdin) == null ? void 0 : _child_stdin.on('error', ()=>stop([], 'could not write discovery request'));
+ child.on('error', ()=>stop([], 'could not start CLI'));
+ child.once('close', ()=>{
+ clearTimeout(timeout);
+ clearTimeout(killTimer);
+ process.removeListener('SIGINT', interrupt);
+ process.removeListener('SIGTERM', interrupt);
+ process.removeListener('SIGHUP', interrupt);
+ signal == null ? void 0 : signal.removeEventListener('abort', interrupt);
+ if (!stopping) debug('%s model discovery failed: CLI exited early', name);
+ resolve(result);
+ });
+ child.once('spawn', protocol.initialize);
+ });
+}
+
+//# sourceMappingURL=model-discovery.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/model-discovery.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/model-discovery.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..43ea7bdf4d0c3f3cc24445cbb176a3930ddbddaf
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/model-discovery.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/model-discovery.ts"],"sourcesContent":["import { randomUUID } from 'crypto'\nimport spawn from 'next/dist/compiled/cross-spawn'\nimport createDebug from 'next/dist/compiled/debug'\n\nconst debug = createDebug('next:upgrade')\n\nexport type UpgradeModel = {\n id: string\n label: string\n description: string\n efforts: string[]\n isDefault: boolean\n}\n\nfunction record(value: unknown): Record {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record)\n : {}\n}\n\nfunction string(value: unknown): string {\n return typeof value === 'string' ? value : ''\n}\n\nfunction efforts(value: unknown): string[] {\n return Array.isArray(value)\n ? [\n ...new Set(\n value.map(string).filter((level) => level && level !== 'default')\n ),\n ]\n : []\n}\n\nfunction parseModels(\n value: unknown,\n parse: (model: Record) => UpgradeModel | null\n): UpgradeModel[] {\n if (!Array.isArray(value)) {\n throw new Error('unexpected model catalog format')\n }\n return value\n .map((entry) => parse(record(entry)))\n .filter((model) => model !== null)\n}\n\ntype DiscoveryProtocol = {\n initialize(): void\n receive(message: Record): void\n}\n\nexport function getCodexModels(\n path: string,\n cwd: string,\n signal?: AbortSignal\n) {\n return discoverModels(\n 'codex',\n path,\n ['app-server'],\n cwd,\n signal,\n (send, complete) => {\n const initializeId = randomUUID()\n let listId: string | undefined\n const models: UpgradeModel[] = []\n const cursors = new Set()\n const list = (cursor?: string) => {\n listId = randomUUID()\n send({\n id: listId,\n method: 'model/list',\n params: { includeHidden: false, ...(cursor ? { cursor } : {}) },\n })\n }\n return {\n initialize() {\n send({\n id: initializeId,\n method: 'initialize',\n params: { clientInfo: { name: 'next_upgrade', version: '1' } },\n })\n },\n receive(message) {\n if (\n message.id !== initializeId &&\n (listId === undefined || message.id !== listId)\n )\n return\n if (message.error) throw new Error('CLI returned a protocol error')\n if (message.id === initializeId) {\n if (!message.result)\n throw new Error('missing initialization result')\n send({ method: 'initialized' })\n list()\n return\n }\n const response = record(message.result)\n models.push(\n ...parseModels(response.data, (model) => {\n const id = string(model.model)\n if (!id || model.hidden === true) return null\n return {\n id,\n label: string(model.displayName) || id,\n description: string(model.description),\n efforts: efforts(\n Array.isArray(model.supportedReasoningEfforts)\n ? model.supportedReasoningEfforts.map(\n (level) => record(level).reasoningEffort\n )\n : undefined\n ),\n isDefault: model.isDefault === true,\n }\n })\n )\n const cursor = response.nextCursor\n if (cursor !== null && cursor !== undefined) {\n if (typeof cursor !== 'string' || !cursor || cursors.has(cursor)) {\n throw new Error('invalid pagination cursor')\n }\n cursors.add(cursor)\n list(cursor)\n return\n }\n complete(models)\n },\n }\n }\n )\n}\n\nexport function getClaudeModels(\n path: string,\n cwd: string,\n signal?: AbortSignal\n) {\n return discoverModels(\n 'claude',\n path,\n [\n '-p',\n '--input-format',\n 'stream-json',\n '--output-format',\n 'stream-json',\n '--verbose',\n '--no-session-persistence',\n ],\n cwd,\n signal,\n (send, complete) => {\n const initializeId = randomUUID()\n return {\n initialize() {\n send({\n type: 'control_request',\n request_id: initializeId,\n request: { subtype: 'initialize' },\n })\n },\n receive(message) {\n if (message.type !== 'control_response') return\n const response = record(message.response)\n if (response.request_id !== initializeId) return\n if (response.subtype !== 'success')\n throw new Error('CLI returned an initialization error')\n complete(\n parseModels(record(response.response).models, (model) => {\n const id = string(model.value)\n if (!id) return null\n return {\n id,\n label: string(model.displayName) || id,\n description: string(model.description),\n efforts:\n model.supportsEffort === false\n ? []\n : efforts(model.supportedEffortLevels),\n isDefault: id === 'default',\n }\n })\n )\n },\n }\n }\n )\n}\n\nexport function getHarnessModels(\n name: 'codex' | 'claude',\n path: string,\n cwd: string,\n signal?: AbortSignal\n): Promise {\n return name === 'codex'\n ? getCodexModels(path, cwd, signal)\n : getClaudeModels(path, cwd, signal)\n}\n\n// null means discovery was cancelled, rather than an unavailable catalog.\nasync function discoverModels(\n name: string,\n path: string,\n args: string[],\n cwd: string,\n signal: AbortSignal | undefined,\n createProtocol: (\n send: (message: unknown) => void,\n complete: (models: UpgradeModel[]) => void\n ) => DiscoveryProtocol\n): Promise {\n if (signal?.aborted) return null\n let child: ReturnType\n try {\n child = spawn(path, args, { cwd, stdio: 'pipe' })\n } catch {\n debug('%s model discovery failed: could not start CLI', name)\n return []\n }\n\n return new Promise((resolve) => {\n let buffer = ''\n let bytes = 0\n let stopping = false\n let result: UpgradeModel[] | null = []\n let killTimer: ReturnType | undefined\n\n const stop = (value: UpgradeModel[] | null, reason?: string) => {\n if (stopping) return\n stopping = true\n result = value\n clearTimeout(timeout)\n if (reason) debug('%s model discovery failed: %s', name, reason)\n child.stdin?.end()\n child.kill('SIGTERM')\n killTimer = setTimeout(() => child.kill('SIGKILL'), 250)\n }\n const timeout = setTimeout(() => stop([], 'timed out'), 5000)\n const interrupt = () => stop(null)\n process.on('SIGINT', interrupt)\n process.on('SIGTERM', interrupt)\n process.on('SIGHUP', interrupt)\n\n const send = (message: unknown) => {\n if (!stopping) child.stdin?.write(JSON.stringify(message) + '\\n')\n }\n const protocol = createProtocol(send, (models) => {\n const unique = [\n ...new Map(models.map((model) => [model.id, model])).values(),\n ]\n stop(unique, unique.length ? undefined : 'no usable models')\n })\n signal?.addEventListener('abort', interrupt, { once: true })\n const countOutput = (chunk: Buffer | string) => {\n bytes += Buffer.byteLength(chunk)\n if (bytes > 20 * 1024 * 1024) stop([], 'output limit exceeded')\n }\n child.stdout?.setEncoding('utf8')\n child.stdout?.on('data', (chunk: string) => {\n countOutput(chunk)\n if (stopping) return\n buffer += chunk\n let newline: number\n while (!stopping && (newline = buffer.indexOf('\\n')) !== -1) {\n const line = buffer.slice(0, newline).trim()\n buffer = buffer.slice(newline + 1)\n if (!line) continue\n try {\n protocol.receive(record(JSON.parse(line)))\n } catch {\n stop([], 'invalid discovery response')\n }\n }\n })\n // Drain stderr, but never log raw CLI output (which may contain credentials).\n child.stderr?.on('data', countOutput)\n child.stdin?.on('error', () =>\n stop([], 'could not write discovery request')\n )\n child.on('error', () => stop([], 'could not start CLI'))\n child.once('close', () => {\n clearTimeout(timeout)\n clearTimeout(killTimer)\n process.removeListener('SIGINT', interrupt)\n process.removeListener('SIGTERM', interrupt)\n process.removeListener('SIGHUP', interrupt)\n signal?.removeEventListener('abort', interrupt)\n if (!stopping) debug('%s model discovery failed: CLI exited early', name)\n resolve(result)\n })\n child.once('spawn', protocol.initialize)\n })\n}\n"],"names":["randomUUID","spawn","createDebug","debug","record","value","Array","isArray","string","efforts","Set","map","filter","level","parseModels","parse","Error","entry","model","getCodexModels","path","cwd","signal","discoverModels","send","complete","initializeId","listId","models","cursors","list","cursor","id","method","params","includeHidden","initialize","clientInfo","name","version","receive","message","undefined","error","result","response","push","data","hidden","label","displayName","description","supportedReasoningEfforts","reasoningEffort","isDefault","nextCursor","has","add","getClaudeModels","type","request_id","request","subtype","supportsEffort","supportedEffortLevels","getHarnessModels","args","createProtocol","aborted","child","stdio","Promise","resolve","buffer","bytes","stopping","killTimer","stop","reason","clearTimeout","timeout","stdin","end","kill","setTimeout","interrupt","process","on","write","JSON","stringify","protocol","unique","Map","values","length","addEventListener","once","countOutput","chunk","Buffer","byteLength","stdout","setEncoding","newline","indexOf","line","slice","trim","stderr","removeListener","removeEventListener"],"mappings":"AAAA,SAASA,UAAU,QAAQ,SAAQ;AACnC,OAAOC,WAAW,iCAAgC;AAClD,OAAOC,iBAAiB,2BAA0B;AAElD,MAAMC,QAAQD,YAAY;AAU1B,SAASE,OAAOC,KAAc;IAC5B,OAAOA,UAAU,QAAQ,OAAOA,UAAU,YAAY,CAACC,MAAMC,OAAO,CAACF,SAChEA,QACD,CAAC;AACP;AAEA,SAASG,OAAOH,KAAc;IAC5B,OAAO,OAAOA,UAAU,WAAWA,QAAQ;AAC7C;AAEA,SAASI,QAAQJ,KAAc;IAC7B,OAAOC,MAAMC,OAAO,CAACF,SACjB;WACK,IAAIK,IACLL,MAAMM,GAAG,CAACH,QAAQI,MAAM,CAAC,CAACC,QAAUA,SAASA,UAAU;KAE1D,GACD,EAAE;AACR;AAEA,SAASC,YACPT,KAAc,EACdU,KAA8D;IAE9D,IAAI,CAACT,MAAMC,OAAO,CAACF,QAAQ;QACzB,MAAM,IAAIW,MAAM;I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,EAAE;gBACX;YACF;QACF;SAEAR,gBAAAA,MAAMwC,MAAM,qBAAZxC,cAAckB,EAAE,CAAC,QAAQW;SACzB7B,eAAAA,MAAMY,KAAK,qBAAXZ,aAAakB,EAAE,CAAC,SAAS,IACvBV,KAAK,EAAE,EAAE;QAEXR,MAAMkB,EAAE,CAAC,SAAS,IAAMV,KAAK,EAAE,EAAE;QACjCR,MAAM4B,IAAI,CAAC,SAAS;YAClBlB,aAAaC;YACbD,aAAaH;YACbU,QAAQwB,cAAc,CAAC,UAAUzB;YACjCC,QAAQwB,cAAc,CAAC,WAAWzB;YAClCC,QAAQwB,cAAc,CAAC,UAAUzB;YACjC/D,0BAAAA,OAAQyF,mBAAmB,CAAC,SAAS1B;YACrC,IAAI,CAACV,UAAUxE,MAAM,+CAA+CmC;YACpEkC,QAAQ5B;QACV;QACAyB,MAAM4B,IAAI,CAAC,SAASN,SAASvD,UAAU;IACzC;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/nudge.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/nudge.js
new file mode 100644
index 0000000000000000000000000000000000000000..c808f90ae4453bbca24b265f86decb8d2242e58c
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/nudge.js
@@ -0,0 +1,468 @@
+import { execFile } from 'child_process';
+import { createHash, randomUUID } from 'crypto';
+import { mkdir, readFile, realpath, rename, rm, writeFile } from 'fs/promises';
+import { basename, dirname, join, relative, resolve } from 'path';
+import { promisify } from 'util';
+import { updateInitialEnv } from '@next/env';
+import * as Log from '../../build/output/log';
+import { eventAgentUpgradeNudgeDecision, eventAgentUpgradeNudgeShown, eventAgentUpgradePolicyDetected } from '../../telemetry/events/agent-upgrade';
+import semver from 'next/dist/compiled/semver';
+import { getAgentName } from '../../telemetry/agent-name';
+import { getPendingFutureDefaults } from './future-defaults';
+import { isCI } from '../../server/ci-info';
+function getRequestedUpgrade() {
+ const policy = process.env.__NEXT_AGENT_UPGRADE;
+ return policy === 'security' || policy === 'latest' || policy === 'experimental-future' ? policy : null;
+}
+const RETRY_TTL = 5 * 60 * 1000;
+const allowedRetries = new Set(process.env.NEXT_PRIVATE_WORKER === '1' ? (process.env.NEXT_PRIVATE_ALLOWED_UPGRADE_RETRIES ?? '').split(',').filter((identity)=>/^[a-f0-9]{64}$/.test(identity)) : []);
+function hasCode(error, code) {
+ return typeof error === 'object' && error !== null && 'code' in error && error.code === code;
+}
+async function writeRetry(path, issuedAt) {
+ const temporary = `${path}.${randomUUID()}.tmp`;
+ try {
+ await writeFile(temporary, JSON.stringify({
+ issuedAt
+ }), {
+ mode: 384
+ });
+ await rename(temporary, path);
+ } finally{
+ await rm(temporary, {
+ force: true
+ });
+ }
+}
+async function allowNudgeRetry({ directory, distDir, command }, version, kind) {
+ const project = await realpath(directory);
+ const identity = createHash('sha256').update(`${project}\0${version}\0${command}\0${kind}`).digest('hex');
+ if (allowedRetries.has(identity)) {
+ return true;
+ }
+ const cache = resolve(project, distDir, 'cache', 'next-agentic-upgrade-retries');
+ const receipt = join(cache, `${identity}.json`);
+ const claimed = `${receipt}.${randomUUID()}.claim`;
+ await mkdir(cache, {
+ recursive: true
+ });
+ try {
+ await rename(receipt, claimed);
+ } catch (error) {
+ if (!hasCode(error, 'ENOENT')) {
+ throw error;
+ }
+ await writeRetry(receipt, Date.now());
+ return false;
+ }
+ let issuedAt;
+ try {
+ const value = JSON.parse(await readFile(claimed, 'utf8'));
+ issuedAt = typeof value === 'object' && value !== null ? Reflect.get(value, 'issuedAt') : undefined;
+ } catch {
+ issuedAt = undefined;
+ } finally{
+ await rm(claimed, {
+ force: true
+ });
+ }
+ const now = Date.now();
+ if (typeof issuedAt === 'number' && issuedAt <= now && now - issuedAt < RETRY_TTL) {
+ if (command === 'dev' && process.env.NEXT_PRIVATE_WORKER === '1') {
+ await new Promise((complete, reject)=>{
+ const message = {
+ nextUpgradeRetryAllowed: identity
+ };
+ process.send(message, (error)=>{
+ if (error) {
+ reject(error);
+ } else {
+ complete();
+ }
+ });
+ });
+ }
+ allowedRetries.add(identity);
+ return true;
+ }
+ await writeRetry(receipt, Date.now());
+ return false;
+}
+export function getUpgradeContext(config) {
+ return {
+ distDir: config.distDir,
+ cacheComponents: config.cacheComponents,
+ configuredPolicy: config.experimental.agentUpgrade ?? null,
+ experimental: {
+ agentUpgrade: getRequestedUpgrade() ?? config.experimental.agentUpgrade ?? false
+ }
+ };
+}
+export async function assessUpgrade(directory, config, installedVersion = "16.4.0" || 'unknown', stopBefore = null, forceVersionReminder = false) {
+ const policy = config.experimental.agentUpgrade;
+ if (policy !== 'security' && policy !== 'latest' && policy !== 'experimental-future') {
+ return null;
+ }
+ if (isTerminalForcedForTesting()) {
+ // Offer a fixed reminder without querying advisories or past dismissals.
+ return {
+ policy,
+ installedVersion,
+ kind: 'security',
+ reference: null,
+ targetVersion: installedVersion
+ };
+ }
+ if (stopBefore === 'security') {
+ return null;
+ }
+ if (!semver.valid(installedVersion)) {
+ return null;
+ }
+ const { getPrereleaseChannel, getUpgradeAssessment, getLatestUpgradeVersion } = require('./prepare-upgrade');
+ if (semver.prerelease(installedVersion) && !getPrereleaseChannel(installedVersion)) {
+ return null;
+ }
+ let assessment;
+ try {
+ assessment = await getUpgradeAssessment(installedVersion, policy, stopBefore === 'latest');
+ } catch {
+ Log.warn('Could not check Next.js security advisories. Continuing without an upgrade assessment.');
+ return null;
+ }
+ const { upgrade } = assessment;
+ if (upgrade.status !== 'ready') {
+ // TODO: Record affected and upgrade.status in telemetry so we can see when
+ // an advisory applies but no ready target was available to nudge.
+ return null;
+ }
+ if (assessment.affected) {
+ return {
+ kind: 'security',
+ policy,
+ installedVersion,
+ reference: assessment.reference,
+ targetVersion: upgrade.targetVersion
+ };
+ }
+ if (policy === 'security' || stopBefore === 'latest') {
+ return null;
+ }
+ const latestVersion = getLatestUpgradeVersion(installedVersion, upgrade.targetVersion);
+ if (latestVersion || forceVersionReminder && upgrade.targetVersion !== installedVersion) {
+ return {
+ kind: 'latest',
+ policy,
+ installedVersion,
+ latestVersion: upgrade.targetVersion,
+ names: policy === 'experimental-future' ? getPendingFutureDefaults(directory, config, upgrade.targetVersion).map((entry)=>entry.name) : []
+ };
+ }
+ if (policy !== 'experimental-future' || stopBefore === 'experimental-future') {
+ return null;
+ }
+ const pending = getPendingFutureDefaults(directory, config, installedVersion);
+ if (pending.length === 0) {
+ return null;
+ }
+ return {
+ kind: 'experimental-future',
+ policy,
+ installedVersion,
+ targetVersion: upgrade.targetVersion,
+ names: pending.map((entry)=>entry.name)
+ };
+}
+async function nudgeUpgradeForAgent(options, reminder, nudgeId, agentProduct, telemetry, policyEvent) {
+ let summary;
+ let recommendation;
+ let reference = null;
+ switch(reminder.kind){
+ case 'security':
+ summary = 'Your version of Next.js is affected by a known security vulnerability.';
+ recommendation = 'We strongly recommend you upgrade Next.js.';
+ reference = reminder.reference;
+ break;
+ case 'latest':
+ var _semver_prerelease;
+ summary = `Next.js ${reminder.latestVersion ?? '[latest version]'} is available. You're using ${reminder.installedVersion}.`;
+ recommendation = 'We recommend you upgrade Next.js.';
+ reference = `https://registry.npmjs.org/next/${((_semver_prerelease = semver.prerelease(reminder.installedVersion)) == null ? void 0 : _semver_prerelease[0]) === 'canary' ? 'canary' : 'latest'}`;
+ break;
+ case 'experimental-future':
+ summary = `Installed Next.js ${reminder.installedVersion} includes Future Defaults available for this app:\n\n${reminder.names.map((name)=>`- ${name}`).join('\n')}`;
+ recommendation = 'We recommend you adopt these Future Defaults.';
+ break;
+ }
+ // Pass attribution on the invocation using the same command syntax on every platform.
+ const command = `next upgrade --agent=${reminder.policy} --internal-nudge-id=${nudgeId}`;
+ const message = `${summary}
+
+**${recommendation}**
+
+This command stopped to show the upgrade recommendation. Retry the same command to continue the original task.
+
+When you report back to the user, include this upgrade recommendation even if the retry succeeds.
+
+At the end of the task, ask the user once: "Would you like me to run the '${reminder.policy}' upgrade in the background in a separate Git worktree? I can use the current checkout if you prefer." If the app is not in Git, say it will run in place. Use their worktree choice and continue in this agent session. Run this command from this app's directory:
+
+\`\`\`
+${command}
+\`\`\`
+
+${reference ? `Reference: ${reference}` : ''}`;
+ let retryAllowed = false;
+ try {
+ retryAllowed = await allowNudgeRetry(options, reminder.installedVersion, reminder.kind);
+ } catch {
+ Log.warn('Could not prepare an upgrade retry. This command will remain blocked.');
+ }
+ if (retryAllowed) {
+ telemetry == null ? void 0 : telemetry.record(policyEvent);
+ Log.warn(`${summary} This command is continuing after the upgrade reminder.${reference ? `\nReference: ${reference}` : ''}`);
+ return;
+ }
+ // Queue the full nudge once, then send it outside the command that is about to stop.
+ if (telemetry) {
+ try {
+ if (telemetry.isEnabled || process.env.NEXT_TELEMETRY_DEBUG) {
+ telemetry.flushDetached({
+ mode: 'dev',
+ dir: options.directory,
+ distDir: resolve(options.directory, options.distDir),
+ events: [
+ policyEvent,
+ eventAgentUpgradeNudgeShown({
+ nudgeId,
+ recipient: 'agent',
+ agentProduct,
+ sourceCommand: options.command,
+ policy: reminder.policy,
+ nudgeKind: reminder.kind
+ })
+ ]
+ });
+ }
+ } catch (error) {
+ Log.warn(`Could not queue upgrade telemetry: ${String(error)}`);
+ }
+ }
+ const error = new Error(message);
+ error.name = reminder.kind === 'security' ? 'SecurityFatalError' : 'UpgradeNudgeError';
+ Object.assign(error, {
+ exitCode: 1
+ });
+ throw error;
+}
+async function getUpgradePreferences(directory) {
+ const Conf = require('next/dist/compiled/conf');
+ const project = await realpath(directory);
+ let identity = project;
+ let projectName = basename(project);
+ try {
+ const { stdout } = await promisify(execFile)('git', [
+ 'rev-parse',
+ '--show-toplevel',
+ '--git-common-dir'
+ ], {
+ cwd: project,
+ timeout: 1000
+ });
+ const [root, common] = stdout.trimEnd().split('\n');
+ const commonDirectory = await realpath(resolve(project, common));
+ const appPath = relative(await realpath(root), project);
+ // Worktrees share a Git directory, but monorepo apps need separate keys.
+ identity = `${commonDirectory}\0${appPath}`;
+ projectName = basename(appPath || (basename(commonDirectory) === '.git' ? dirname(commonDirectory) : commonDirectory));
+ } catch {
+ // Apps outside Git (or without Git installed) keep their directory identity.
+ }
+ const hash = createHash('sha256').update(identity).digest('hex');
+ // Conf treats dots as separators, including dots in directory names.
+ const name = encodeURIComponent(projectName).replace(/\./g, '%2E');
+ const key = `agent-upgrade.${name}.${hash}`;
+ // Upgrade preferences share Next.js' global config location, not telemetry consent.
+ return {
+ key,
+ preferences: new Conf({
+ projectName: 'nextjs'
+ })
+ };
+}
+// The terminal test needs a menu in CI and under agents, without the network.
+function isTerminalForcedForTesting() {
+ return process.env.__NEXT_AGENT_UPGRADE_FORCE_TERMINAL_FOR_TESTING === '1';
+}
+function canPromptForUpgrade() {
+ return (!isCI || isTerminalForcedForTesting()) && Boolean(process.stdin.isTTY && process.stdout.isTTY) && process.env.TERM !== 'dumb';
+}
+async function getUpgradeDismissal(directory, version, policy) {
+ try {
+ const { key, preferences } = await getUpgradePreferences(directory);
+ for (const kind of [
+ 'security',
+ 'latest',
+ 'experimental-future'
+ ]){
+ if (preferences.get(`${key}.${kind}`) === `${version}:${policy}`) {
+ return kind;
+ }
+ }
+ } catch {
+ // A preferences failure must not prevent assessing or skipping a reminder.
+ }
+ return null;
+}
+async function nudgeUpgradeForHuman(directory, reminder, signal, onShown) {
+ if (signal.aborted) {
+ return 'skip';
+ }
+ let message;
+ if (reminder.kind === 'security') {
+ message = `⚠ Installed Next.js version ${reminder.installedVersion} is affected by a known security vulnerability.`;
+ message += `\n\nNext.js security version upgrade available: ${reminder.installedVersion} -> ${reminder.targetVersion}`;
+ } else if (reminder.policy === 'experimental-future') {
+ const targetVersion = reminder.kind === 'latest' ? reminder.latestVersion : reminder.targetVersion;
+ const versions = targetVersion !== reminder.installedVersion ? ` ${reminder.installedVersion} -> ${targetVersion ?? '[target version]'}` : '';
+ message = `Next.js Future Default upgrade available:${versions}`;
+ if (reminder.names.length > 0) {
+ message += `\n\n${reminder.names.map((name)=>`- ${name}`).join('\n')}`;
+ }
+ } else if (reminder.kind === 'latest') {
+ message = `Next.js latest version upgrade available: ${reminder.installedVersion} -> ${reminder.latestVersion ?? '[target version]'}`;
+ } else {
+ return 'skip';
+ }
+ const { promptUpgrade } = require('./prompt');
+ const action = await promptUpgrade({
+ message,
+ signal,
+ canUpdate: true,
+ onShown
+ });
+ if (signal.aborted) {
+ return 'skip';
+ }
+ if (action === 'dismiss') {
+ try {
+ const { key, preferences } = await getUpgradePreferences(directory);
+ preferences.set(`${key}.${reminder.kind}`, `${reminder.installedVersion}:${reminder.policy}`);
+ } catch {
+ Log.warn('Could not save your upgrade reminder preference. Skipping for this session.');
+ }
+ }
+ return action;
+}
+export async function runUpgrade(directory, policy, nudgeId) {
+ // The agent's dev/build commands must not trigger this explicit request again.
+ delete process.env.__NEXT_AGENT_UPGRADE;
+ updateInitialEnv({
+ __NEXT_AGENT_UPGRADE: undefined
+ });
+ const { spawnNextUpgrade } = await import('../../cli/next-upgrade.js');
+ // Human Update actions invoke the CLI directly, so their ID does not need an env var.
+ await spawnNextUpgrade(directory, {
+ revision: 'latest',
+ verbose: false,
+ agent: policy
+ }, nudgeId ? {
+ id: nudgeId,
+ recipient: 'human'
+ } : null);
+ return process.exitCode ?? 0;
+}
+export async function shouldPromptForUpgrade() {
+ return canPromptForUpgrade() && (isTerminalForcedForTesting() || !await getAgentName());
+}
+export async function nudgeUpgrade(directory, config, command, signal, initialAssessment, telemetryOptions) {
+ const requested = getRequestedUpgrade();
+ const policy = requested ?? config.experimental.agentUpgrade;
+ if (policy !== 'security' && policy !== 'latest' && policy !== 'experimental-future') {
+ return;
+ }
+ // Observe the effective policy even when assessment finds no upgrade to offer.
+ const telemetry = (telemetryOptions == null ? void 0 : telemetryOptions.telemetry) ?? null;
+ const policyEvent = eventAgentUpgradePolicyDetected({
+ configuredPolicy: config.configuredPolicy ?? null,
+ effectivePolicy: policy,
+ policySource: requested ? 'environment' : 'config',
+ sourceCommand: command
+ });
+ if (requested && isCI) {
+ telemetry == null ? void 0 : telemetry.record(policyEvent);
+ return;
+ }
+ // An agent's stopped command sends policy and nudge together before synchronous exit.
+ const agent = isTerminalForcedForTesting() ? null : await getAgentName();
+ if (!agent) {
+ telemetry == null ? void 0 : telemetry.record(policyEvent);
+ }
+ const installedVersion = "16.4.0" || 'unknown';
+ let stopBefore = null;
+ if (!agent) {
+ if (!signal || signal.aborted) {
+ return;
+ }
+ if (!canPromptForUpgrade()) {
+ return;
+ }
+ if (!requested) {
+ stopBefore = await getUpgradeDismissal(directory, installedVersion, policy);
+ }
+ if (signal.aborted) {
+ return;
+ }
+ }
+ const reminder = await (stopBefore === null && initialAssessment && !isTerminalForcedForTesting() ? initialAssessment : assessUpgrade(directory, {
+ ...config,
+ experimental: {
+ agentUpgrade: policy
+ }
+ }, installedVersion, stopBefore, requested !== null)).catch((error)=>{
+ if (agent) {
+ telemetry == null ? void 0 : telemetry.record(policyEvent);
+ }
+ throw error;
+ });
+ if (!reminder || (signal == null ? void 0 : signal.aborted)) {
+ if (agent) {
+ telemetry == null ? void 0 : telemetry.record(policyEvent);
+ }
+ return;
+ }
+ // The nudge and any resulting upgrade run share this ID across processes.
+ const nudgeId = randomUUID();
+ if (agent) {
+ await nudgeUpgradeForAgent({
+ directory,
+ distDir: config.distDir,
+ command
+ }, reminder, nudgeId, agent, telemetry, policyEvent);
+ } else if (signal) {
+ // Count a human nudge only after the menu renders, including its selected action.
+ let shown = false;
+ const onShown = telemetryOptions ? ()=>{
+ shown = true;
+ telemetryOptions.onNudgeId == null ? void 0 : telemetryOptions.onNudgeId.call(telemetryOptions, nudgeId);
+ telemetryOptions.telemetry.record(eventAgentUpgradeNudgeShown({
+ nudgeId,
+ recipient: 'human',
+ agentProduct: null,
+ sourceCommand: command,
+ policy: reminder.policy,
+ nudgeKind: reminder.kind
+ }));
+ } : null;
+ const action = await nudgeUpgradeForHuman(directory, reminder, signal, onShown);
+ // The caller flushes after it gives the terminal back.
+ if (shown && telemetry && !signal.aborted) {
+ telemetry.record(eventAgentUpgradeNudgeDecision({
+ nudgeId,
+ action
+ }));
+ }
+ return action;
+ }
+}
+
+//# sourceMappingURL=nudge.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/nudge.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/nudge.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ac8501d84f81cd74d64f662bcabc4de730d6dcb9
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/nudge.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/nudge.ts"],"sourcesContent":["import { execFile } from 'child_process'\nimport { createHash, randomUUID } from 'crypto'\nimport { mkdir, readFile, realpath, rename, rm, writeFile } from 'fs/promises'\nimport { basename, dirname, join, relative, resolve } from 'path'\nimport { promisify } from 'util'\nimport { updateInitialEnv } from '@next/env'\n\nimport * as Log from '../../build/output/log'\nimport type { NextConfigComplete } from '../../server/config-shared'\nimport type { Telemetry } from '../../telemetry/storage'\nimport {\n eventAgentUpgradeNudgeDecision,\n eventAgentUpgradeNudgeShown,\n eventAgentUpgradePolicyDetected,\n} from '../../telemetry/events/agent-upgrade'\nimport semver from 'next/dist/compiled/semver'\nimport type { UpgradeAction } from './prompt'\nimport { getAgentName } from '../../telemetry/agent-name'\nimport { getPendingFutureDefaults } from './future-defaults'\nimport { isCI } from '../../server/ci-info'\n\ntype NudgeOptions = {\n directory: string\n distDir: string\n command: 'dev' | 'build'\n}\n\nexport type NudgeKind = 'security' | 'latest' | 'experimental-future'\n\nfunction getRequestedUpgrade() {\n const policy = process.env.__NEXT_AGENT_UPGRADE\n return policy === 'security' ||\n policy === 'latest' ||\n policy === 'experimental-future'\n ? policy\n : null\n}\n\nconst RETRY_TTL = 5 * 60 * 1000\nconst allowedRetries = new Set(\n process.env.NEXT_PRIVATE_WORKER === '1'\n ? (process.env.NEXT_PRIVATE_ALLOWED_UPGRADE_RETRIES ?? '')\n .split(',')\n .filter((identity) => /^[a-f0-9]{64}$/.test(identity))\n : []\n)\n\nfunction hasCode(error: unknown, code: string): boolean {\n return (\n typeof error === 'object' &&\n error !== null &&\n 'code' in error &&\n error.code === code\n )\n}\n\nasync function writeRetry(path: string, issuedAt: number): Promise {\n const temporary = `${path}.${randomUUID()}.tmp`\n try {\n await writeFile(temporary, JSON.stringify({ issuedAt }), { mode: 0o600 })\n await rename(temporary, path)\n } finally {\n await rm(temporary, { force: true })\n }\n}\n\nasync function allowNudgeRetry(\n { directory, distDir, command }: NudgeOptions,\n version: string,\n kind: NudgeKind\n): Promise {\n const project = await realpath(directory)\n const identity = createHash('sha256')\n .update(`${project}\\0${version}\\0${command}\\0${kind}`)\n .digest('hex')\n\n if (allowedRetries.has(identity)) {\n return true\n }\n\n const cache = resolve(\n project,\n distDir,\n 'cache',\n 'next-agentic-upgrade-retries'\n )\n const receipt = join(cache, `${identity}.json`)\n const claimed = `${receipt}.${randomUUID()}.claim`\n await mkdir(cache, { recursive: true })\n\n try {\n await rename(receipt, claimed)\n } catch (error) {\n if (!hasCode(error, 'ENOENT')) {\n throw error\n }\n await writeRetry(receipt, Date.now())\n return false\n }\n\n let issuedAt: unknown\n try {\n const value: unknown = JSON.parse(await readFile(claimed, 'utf8'))\n issuedAt =\n typeof value === 'object' && value !== null\n ? Reflect.get(value, 'issuedAt')\n : undefined\n } catch {\n issuedAt = undefined\n } finally {\n await rm(claimed, { force: true })\n }\n\n const now = Date.now()\n if (\n typeof issuedAt === 'number' &&\n issuedAt <= now &&\n now - issuedAt < RETRY_TTL\n ) {\n if (command === 'dev' && process.env.NEXT_PRIVATE_WORKER === '1') {\n await new Promise((complete, reject) => {\n const message = { nextUpgradeRetryAllowed: identity }\n process.send!(message, (error: Error | null) => {\n if (error) {\n reject(error)\n } else {\n complete()\n }\n })\n })\n }\n allowedRetries.add(identity)\n return true\n }\n\n await writeRetry(receipt, Date.now())\n return false\n}\n\nexport type UpgradeContext = Pick<\n NextConfigComplete,\n 'distDir' | 'cacheComponents'\n> & {\n configuredPolicy: NudgeKind | false | null\n experimental: { agentUpgrade: NudgeKind | false }\n}\n\nexport type UpgradeReminder = {\n policy: NudgeKind\n installedVersion: string\n} & (\n | {\n kind: 'security'\n reference: string | null\n targetVersion: string\n }\n | { kind: 'latest'; latestVersion: string | null; names: string[] }\n | { kind: 'experimental-future'; targetVersion: string; names: string[] }\n)\n\nexport function getUpgradeContext(config: NextConfigComplete): UpgradeContext {\n return {\n distDir: config.distDir,\n cacheComponents: config.cacheComponents,\n configuredPolicy: config.experimental.agentUpgrade ?? null,\n experimental: {\n agentUpgrade:\n getRequestedUpgrade() ?? config.experimental.agentUpgrade ?? false,\n },\n }\n}\n\nexport async function assessUpgrade(\n directory: string,\n config: UpgradeContext,\n installedVersion: string = process.env.__NEXT_VERSION || 'unknown',\n stopBefore: NudgeKind | null = null,\n forceVersionReminder: boolean = false\n): Promise {\n const policy = config.experimental.agentUpgrade\n if (\n policy !== 'security' &&\n policy !== 'latest' &&\n policy !== 'experimental-future'\n ) {\n return null\n }\n if (isTerminalForcedForTesting()) {\n // Offer a fixed reminder without querying advisories or past dismissals.\n return {\n policy,\n installedVersion,\n kind: 'security',\n reference: null,\n targetVersion: installedVersion,\n }\n }\n if (stopBefore === 'security') {\n return null\n }\n\n if (!semver.valid(installedVersion)) {\n return null\n }\n const {\n getPrereleaseChannel,\n getUpgradeAssessment,\n getLatestUpgradeVersion,\n } = require('./prepare-upgrade') as typeof import('./prepare-upgrade')\n if (\n semver.prerelease(installedVersion) &&\n !getPrereleaseChannel(installedVersion)\n ) {\n return null\n }\n let assessment\n try {\n assessment = await getUpgradeAssessment(\n installedVersion,\n policy,\n stopBefore === 'latest'\n )\n } catch {\n Log.warn(\n 'Could not check Next.js security advisories. Continuing without an upgrade assessment.'\n )\n return null\n }\n const { upgrade } = assessment\n if (upgrade.status !== 'ready') {\n // TODO: Record affected and upgrade.status in telemetry so we can see when\n // an advisory applies but no ready target was available to nudge.\n return null\n }\n if (assessment.affected) {\n return {\n kind: 'security',\n policy,\n installedVersion,\n reference: assessment.reference,\n targetVersion: upgrade.targetVersion,\n }\n }\n if (policy === 'security' || stopBefore === 'latest') {\n return null\n }\n const latestVersion = getLatestUpgradeVersion(\n installedVersion,\n upgrade.targetVersion\n )\n if (\n latestVersion ||\n (forceVersionReminder && upgrade.targetVersion !== installedVersion)\n ) {\n return {\n kind: 'latest',\n policy,\n installedVersion,\n latestVersion: upgrade.targetVersion,\n names:\n policy === 'experimental-future'\n ? getPendingFutureDefaults(\n directory,\n config,\n upgrade.targetVersion\n ).map((entry) => entry.name)\n : [],\n }\n }\n\n if (\n policy !== 'experimental-future' ||\n stopBefore === 'experimental-future'\n ) {\n return null\n }\n const pending = getPendingFutureDefaults(directory, config, installedVersion)\n if (pending.length === 0) {\n return null\n }\n return {\n kind: 'experimental-future',\n policy,\n installedVersion,\n targetVersion: upgrade.targetVersion,\n names: pending.map((entry) => entry.name),\n }\n}\n\nasync function nudgeUpgradeForAgent(\n options: NudgeOptions,\n reminder: UpgradeReminder,\n nudgeId: string,\n agentProduct: string,\n telemetry: Telemetry | null,\n policyEvent: ReturnType\n): Promise {\n let summary: string\n let recommendation: string\n let reference: string | null = null\n switch (reminder.kind) {\n case 'security':\n summary =\n 'Your version of Next.js is affected by a known security vulnerability.'\n recommendation = 'We strongly recommend you upgrade Next.js.'\n reference = reminder.reference\n break\n case 'latest':\n summary = `Next.js ${reminder.latestVersion ?? '[latest version]'} is available. You're using ${reminder.installedVersion}.`\n recommendation = 'We recommend you upgrade Next.js.'\n reference = `https://registry.npmjs.org/next/${semver.prerelease(reminder.installedVersion)?.[0] === 'canary' ? 'canary' : 'latest'}`\n break\n case 'experimental-future':\n summary = `Installed Next.js ${reminder.installedVersion} includes Future Defaults available for this app:\\n\\n${reminder.names.map((name) => `- ${name}`).join('\\n')}`\n recommendation = 'We recommend you adopt these Future Defaults.'\n break\n }\n // Pass attribution on the invocation using the same command syntax on every platform.\n const command = `next upgrade --agent=${reminder.policy} --internal-nudge-id=${nudgeId}`\n const message = `${summary}\n\n**${recommendation}**\n\nThis command stopped to show the upgrade recommendation. Retry the same command to continue the original task.\n\nWhen you report back to the user, include this upgrade recommendation even if the retry succeeds.\n\nAt the end of the task, ask the user once: \"Would you like me to run the '${reminder.policy}' upgrade in the background in a separate Git worktree? I can use the current checkout if you prefer.\" If the app is not in Git, say it will run in place. Use their worktree choice and continue in this agent session. Run this command from this app's directory:\n\n\\`\\`\\`\n${command}\n\\`\\`\\`\n\n${reference ? `Reference: ${reference}` : ''}`\n let retryAllowed = false\n try {\n retryAllowed = await allowNudgeRetry(\n options,\n reminder.installedVersion,\n reminder.kind\n )\n } catch {\n Log.warn(\n 'Could not prepare an upgrade retry. This command will remain blocked.'\n )\n }\n if (retryAllowed) {\n telemetry?.record(policyEvent)\n Log.warn(\n `${summary} This command is continuing after the upgrade reminder.${reference ? `\\nReference: ${reference}` : ''}`\n )\n return\n }\n // Queue the full nudge once, then send it outside the command that is about to stop.\n if (telemetry) {\n try {\n if (telemetry.isEnabled || process.env.NEXT_TELEMETRY_DEBUG) {\n telemetry.flushDetached({\n mode: 'dev',\n dir: options.directory,\n distDir: resolve(options.directory, options.distDir),\n events: [\n policyEvent,\n eventAgentUpgradeNudgeShown({\n nudgeId,\n recipient: 'agent',\n agentProduct,\n sourceCommand: options.command,\n policy: reminder.policy,\n nudgeKind: reminder.kind,\n }),\n ],\n })\n }\n } catch (error) {\n Log.warn(`Could not queue upgrade telemetry: ${String(error)}`)\n }\n }\n const error = new Error(message)\n error.name =\n reminder.kind === 'security' ? 'SecurityFatalError' : 'UpgradeNudgeError'\n Object.assign(error, { exitCode: 1 })\n throw error\n}\n\nasync function getUpgradePreferences(directory: string) {\n const Conf =\n require('next/dist/compiled/conf') as typeof import('next/dist/compiled/conf')\n const project = await realpath(directory)\n let identity = project\n let projectName = basename(project)\n try {\n const { stdout } = await promisify(execFile)(\n 'git',\n ['rev-parse', '--show-toplevel', '--git-common-dir'],\n { cwd: project, timeout: 1000 }\n )\n const [root, common] = stdout.trimEnd().split('\\n')\n const commonDirectory = await realpath(resolve(project, common))\n const appPath = relative(await realpath(root), project)\n // Worktrees share a Git directory, but monorepo apps need separate keys.\n identity = `${commonDirectory}\\0${appPath}`\n projectName = basename(\n appPath ||\n (basename(commonDirectory) === '.git'\n ? dirname(commonDirectory)\n : commonDirectory)\n )\n } catch {\n // Apps outside Git (or without Git installed) keep their directory identity.\n }\n const hash = createHash('sha256').update(identity).digest('hex')\n // Conf treats dots as separators, including dots in directory names.\n const name = encodeURIComponent(projectName).replace(/\\./g, '%2E')\n const key = `agent-upgrade.${name}.${hash}`\n // Upgrade preferences share Next.js' global config location, not telemetry consent.\n return { key, preferences: new Conf({ projectName: 'nextjs' }) }\n}\n\n// The terminal test needs a menu in CI and under agents, without the network.\nfunction isTerminalForcedForTesting(): boolean {\n return process.env.__NEXT_AGENT_UPGRADE_FORCE_TERMINAL_FOR_TESTING === '1'\n}\n\nfunction canPromptForUpgrade(): boolean {\n return (\n (!isCI || isTerminalForcedForTesting()) &&\n Boolean(process.stdin.isTTY && process.stdout.isTTY) &&\n process.env.TERM !== 'dumb'\n )\n}\n\nasync function getUpgradeDismissal(\n directory: string,\n version: string,\n policy: NudgeKind\n): Promise {\n try {\n const { key, preferences } = await getUpgradePreferences(directory)\n for (const kind of ['security', 'latest', 'experimental-future'] as const) {\n if (preferences.get(`${key}.${kind}`) === `${version}:${policy}`) {\n return kind\n }\n }\n } catch {\n // A preferences failure must not prevent assessing or skipping a reminder.\n }\n return null\n}\n\nasync function nudgeUpgradeForHuman(\n directory: string,\n reminder: UpgradeReminder,\n signal: AbortSignal,\n onShown: (() => void) | null\n): Promise {\n if (signal.aborted) {\n return 'skip'\n }\n let message: string\n if (reminder.kind === 'security') {\n message = `⚠ Installed Next.js version ${reminder.installedVersion} is affected by a known security vulnerability.`\n message += `\\n\\nNext.js security version upgrade available: ${reminder.installedVersion} -> ${reminder.targetVersion}`\n } else if (reminder.policy === 'experimental-future') {\n const targetVersion =\n reminder.kind === 'latest'\n ? reminder.latestVersion\n : reminder.targetVersion\n const versions =\n targetVersion !== reminder.installedVersion\n ? ` ${reminder.installedVersion} -> ${targetVersion ?? '[target version]'}`\n : ''\n message = `Next.js Future Default upgrade available:${versions}`\n if (reminder.names.length > 0) {\n message += `\\n\\n${reminder.names.map((name) => `- ${name}`).join('\\n')}`\n }\n } else if (reminder.kind === 'latest') {\n message = `Next.js latest version upgrade available: ${reminder.installedVersion} -> ${reminder.latestVersion ?? '[target version]'}`\n } else {\n return 'skip'\n }\n const { promptUpgrade } = require('./prompt') as typeof import('./prompt')\n const action = await promptUpgrade({\n message,\n signal,\n canUpdate: true,\n onShown,\n })\n if (signal.aborted) {\n return 'skip'\n }\n if (action === 'dismiss') {\n try {\n const { key, preferences } = await getUpgradePreferences(directory)\n preferences.set(\n `${key}.${reminder.kind}`,\n `${reminder.installedVersion}:${reminder.policy}`\n )\n } catch {\n Log.warn(\n 'Could not save your upgrade reminder preference. Skipping for this session.'\n )\n }\n }\n return action\n}\n\nexport async function runUpgrade(\n directory: string,\n policy: NudgeKind,\n nudgeId: string | null\n) {\n // The agent's dev/build commands must not trigger this explicit request again.\n delete process.env.__NEXT_AGENT_UPGRADE\n updateInitialEnv({ __NEXT_AGENT_UPGRADE: undefined })\n const { spawnNextUpgrade } = await import('../../cli/next-upgrade.js')\n\n // Human Update actions invoke the CLI directly, so their ID does not need an env var.\n await spawnNextUpgrade(\n directory,\n { revision: 'latest', verbose: false, agent: policy },\n nudgeId ? { id: nudgeId, recipient: 'human' } : null\n )\n return process.exitCode ?? 0\n}\n\nexport async function shouldPromptForUpgrade(): Promise {\n return (\n canPromptForUpgrade() &&\n (isTerminalForcedForTesting() || !(await getAgentName()))\n )\n}\n\nexport async function nudgeUpgrade(\n directory: string,\n config: UpgradeContext,\n command: 'dev' | 'build',\n signal: AbortSignal | null,\n initialAssessment: Promise | null,\n telemetryOptions: {\n telemetry: Telemetry\n onNudgeId: ((nudgeId: string) => void) | null\n } | null\n): Promise {\n const requested = getRequestedUpgrade()\n const policy = requested ?? config.experimental.agentUpgrade\n if (\n policy !== 'security' &&\n policy !== 'latest' &&\n policy !== 'experimental-future'\n ) {\n return\n }\n // Observe the effective policy even when assessment finds no upgrade to offer.\n const telemetry = telemetryOptions?.telemetry ?? null\n const policyEvent = eventAgentUpgradePolicyDetected({\n configuredPolicy: config.configuredPolicy ?? null,\n effectivePolicy: policy,\n policySource: requested ? 'environment' : 'config',\n sourceCommand: command,\n })\n if (requested && isCI) {\n telemetry?.record(policyEvent)\n return\n }\n\n // An agent's stopped command sends policy and nudge together before synchronous exit.\n const agent = isTerminalForcedForTesting() ? null : await getAgentName()\n if (!agent) {\n telemetry?.record(policyEvent)\n }\n const installedVersion = process.env.__NEXT_VERSION || 'unknown'\n let stopBefore: NudgeKind | null = null\n if (!agent) {\n if (!signal || signal.aborted) {\n return\n }\n if (!canPromptForUpgrade()) {\n return\n }\n if (!requested) {\n stopBefore = await getUpgradeDismissal(\n directory,\n installedVersion,\n policy\n )\n }\n if (signal.aborted) {\n return\n }\n }\n const reminder = await (\n stopBefore === null && initialAssessment && !isTerminalForcedForTesting()\n ? initialAssessment\n : assessUpgrade(\n directory,\n { ...config, experimental: { agentUpgrade: policy } },\n installedVersion,\n stopBefore,\n requested !== null\n )\n ).catch((error) => {\n if (agent) {\n telemetry?.record(policyEvent)\n }\n throw error\n })\n if (!reminder || signal?.aborted) {\n if (agent) {\n telemetry?.record(policyEvent)\n }\n return\n }\n\n // The nudge and any resulting upgrade run share this ID across processes.\n const nudgeId = randomUUID()\n if (agent) {\n await nudgeUpgradeForAgent(\n { directory, distDir: config.distDir, command },\n reminder,\n nudgeId,\n agent,\n telemetry,\n policyEvent\n )\n } else if (signal) {\n // Count a human nudge only after the menu renders, including its selected action.\n let shown = false\n const onShown = telemetryOptions\n ? () => {\n shown = true\n telemetryOptions.onNudgeId?.(nudgeId)\n telemetryOptions.telemetry.record(\n eventAgentUpgradeNudgeShown({\n nudgeId,\n recipient: 'human',\n agentProduct: null,\n sourceCommand: command,\n policy: reminder.policy,\n nudgeKind: reminder.kind,\n })\n )\n }\n : null\n\n const action = await nudgeUpgradeForHuman(\n directory,\n reminder,\n signal,\n onShown\n )\n\n // The caller flushes after it gives the terminal back.\n if (shown && telemetry && !signal.aborted) {\n telemetry.record(eventAgentUpgradeNudgeDecision({ nudgeId, action }))\n }\n return action\n }\n}\n"],"names":["execFile","createHash","randomUUID","mkdir","readFile","realpath","rename","rm","writeFile","basename","dirname","join","relative","resolve","promisify","updateInitialEnv","Log","eventAgentUpgradeNudgeDecision","eventAgentUpgradeNudgeShown","eventAgentUpgradePolicyDetected","semver","getAgentName","getPendingFutureDefaults","isCI","getRequestedUpgrade","policy","process","env","__NEXT_AGENT_UPGRADE","RETRY_TTL","allowedRetries","Set","NEXT_PRIVATE_WORKER","NEXT_PRIVATE_ALLOWED_UPGRADE_RETRIES","split","filter","identity","test","hasCode","error","code","writeRetry","path","issuedAt","temporary","JSON","stringify","mode","force","allowNudgeRetry","directory","distDir","command","version","kind","project","update","digest","has","cache","receipt","claimed","recursive","Date","now","value","parse","Reflect","get","undefined","Promise","complete","reject","message","nextUpgradeRetryAllowed","send","add","getUpgradeContext","config","cacheComponents","configuredPolicy","experimental","agentUpgrade","assessUpgrade","installedVersion","__NEXT_VERSION","stopBefore","forceVersionReminder","isTerminalForcedForTesting","reference","targetVersion","valid","getPrereleaseChannel","getUpgradeAssessment","getLatestUpgradeVersion","require","prerelease","assessment","warn","upgrade","status","affected","latestVersion","names","map","entry","name","pending","length","nudgeUpgradeForAgent","options","reminder","nudgeId","agentProduct","telemetry","policyEvent","summary","recommendation","retryAllowed","record","isEnabled","NEXT_TELEMETRY_DEBUG","flushDetached","dir","events","recipient","sourceCommand","nudgeKind","String","Error","Object","assign","exitCode","getUpgradePreferences","Conf","projectName","stdout","cwd","timeout","root","common","trimEnd","commonDirectory","appPath","hash","encodeURIComponent","replace","key","preferences","__NEXT_AGENT_UPGRADE_FORCE_TERMINAL_FOR_TESTING","canPromptForUpgrade","Boolean","stdin","isTTY","TERM","getUpgradeDismissal","nudgeUpgradeForHuman","signal","onShown","aborted","versions","promptUpgrade","action","canUpdate","set","runUpgrade","spawnNextUpgrade","revision","verbose","agent","id","shouldPromptForUpgrade","nudgeUpgrade","initialAssessment","telemetryOptions","requested","effectivePolicy","policySource","catch","shown","onNudgeId"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAe;AACxC,SAASC,UAAU,EAAEC,UAAU,QAAQ,SAAQ;AAC/C,SAASC,KAAK,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,SAAS,QAAQ,cAAa;AAC9E,SAASC,QAAQ,EAAEC,OAAO,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,OAAM;AACjE,SAASC,SAAS,QAAQ,OAAM;AAChC,SAASC,gBAAgB,QAAQ,YAAW;AAE5C,YAAYC,SAAS,yBAAwB;AAG7C,SACEC,8BAA8B,EAC9BC,2BAA2B,EAC3BC,+BAA+B,QAC1B,uCAAsC;AAC7C,OAAOC,YAAY,4BAA2B;AAE9C,SAASC,YAAY,QAAQ,6BAA4B;AACzD,SAASC,wBAAwB,QAAQ,oBAAmB;AAC5D,SAASC,IAAI,QAAQ,uBAAsB;AAU3C,SAASC;IACP,MAAMC,SAASC,QAAQC,GAAG,CAACC,oBAAoB;IAC/C,OAAOH,WAAW,cAChBA,WAAW,YACXA,WAAW,wBACTA,SACA;AACN;AAEA,MAAMI,YAAY,IAAI,KAAK;AAC3B,MAAMC,iBAAiB,IAAIC,IACzBL,QAAQC,GAAG,CAACK,mBAAmB,KAAK,MAChC,AAACN,CAAAA,QAAQC,GAAG,CAACM,oCAAoC,IAAI,EAAC,EACnDC,KAAK,CAAC,KACNC,MAAM,CAAC,CAACC,WAAa,iBAAiBC,IAAI,CAACD,aAC9C,EAAE;AAGR,SAASE,QAAQC,KAAc,EAAEC,IAAY;IAC3C,OACE,OAAOD,UAAU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;YAAEC;QAAQ,GAC9C2D,UACAC,SACAyD,OACAvD,WACAC;IAEJ,OAAO,IAAI0C,QAAQ;QACjB,kFAAkF;QAClF,IAAIsB,QAAQ;QACZ,MAAMrB,UAAUgB,mBACZ;YACEK,QAAQ;YACRL,iBAAiBM,SAAS,oBAA1BN,iBAAiBM,SAAS,MAA1BN,kBAA6B9D;YAC7B8D,iBAAiB5D,SAAS,CAACK,MAAM,CAC/BrG,4BAA4B;gBAC1B8F;gBACAa,WAAW;gBACXZ,cAAc;gBACda,eAAe1E;gBACf3B,QAAQsF,SAAStF,MAAM;gBACvBsG,WAAWhB,SAASzD,IAAI;YAC1B;QAEJ,IACA;QAEJ,MAAM4G,SAAS,MAAMN,qBACnB1G,WACA6D,UACA8C,QACAC;QAGF,uDAAuD;QACvD,IAAIqB,SAASjE,aAAa,CAAC2C,OAAOE,OAAO,EAAE;YACzC7C,UAAUK,MAAM,CAACtG,+BAA+B;gBAAE+F;gBAASkD;YAAO;QACpE;QACA,OAAOA;IACT;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/prepare-upgrade.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prepare-upgrade.js
new file mode 100644
index 0000000000000000000000000000000000000000..3000e688510a87750be53232804ba8325b911fdd
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prepare-upgrade.js
@@ -0,0 +1,342 @@
+import { readFile } from 'fs/promises';
+import { createRequire } from 'module';
+import { join } from 'path';
+import { resetEnv } from '@next/env';
+import semver from 'next/dist/compiled/semver';
+import loadConfig from '../../server/config';
+import { PHASE_INFO } from '../../shared/lib/constants';
+import { getPendingFutureDefaults } from './future-defaults';
+export async function prepareUpgrade(directory, targetRequest = 'security') {
+ if (targetRequest !== 'security' && targetRequest !== 'latest' && targetRequest !== 'experimental-future') {
+ throw new Error(`Unsupported agent upgrade type ${JSON.stringify(targetRequest)}. Expected "security", "latest", or "experimental-future".`);
+ }
+ // Resolve from the app: the invoking canary is only the upgrade tooling.
+ const requireFromApp = createRequire(join(directory, 'package.json'));
+ const installedNext = JSON.parse(await readFile(requireFromApp.resolve('next/package.json'), 'utf8'));
+ const installedVersion = installedNext.version;
+ if (!semver.valid(installedVersion)) {
+ throw new Error('Could not determine the installed Next.js version.');
+ }
+ const { upgrade } = await getUpgradeAssessment(installedVersion, targetRequest);
+ if (upgrade.status !== 'ready' || targetRequest !== 'experimental-future') {
+ return upgrade;
+ }
+ const config = await loadConfig(PHASE_INFO, directory, {
+ silent: true
+ }).finally(resetEnv);
+ const pendingFutureDefaults = getPendingFutureDefaults(directory, config, upgrade.targetVersion);
+ if (upgrade.targetVersion === installedVersion && pendingFutureDefaults.length === 0) {
+ return {
+ status: 'unaffected',
+ reason: `Next.js ${installedVersion} is current and no applicable Future Defaults are pending.`
+ };
+ }
+ return {
+ ...upgrade,
+ futureDefaults: pendingFutureDefaults
+ };
+}
+// TODO: Cache assessments briefly by installed version, policy, and resolved
+// target to avoid repeating nudge lookups. New advisories can affect the same
+// target, so expire cached results and refresh metadata before execution.
+export async function getUpgradeAssessment(installedVersion, policy, onlyIfAffected = false) {
+ if (!semver.valid(installedVersion)) {
+ throw new Error('The running Next.js version is not valid semver.');
+ }
+ const channel = getPrereleaseChannel(installedVersion);
+ if (semver.prerelease(installedVersion) && !channel) {
+ throw new Error('Agent upgrades are not available for this prerelease version of Next.js.');
+ }
+ if (channel && (policy === 'security' || onlyIfAffected)) {
+ return {
+ affected: null,
+ reference: null,
+ upgrade: {
+ status: 'blocked',
+ reason: `The installed Next.js version (${installedVersion}) is a ${channel} prerelease. Security advisories target stable versions, and prereleases do not reliably follow stable version ordering, so an advisory could be a false positive. To upgrade to the latest ${channel === 'canary' ? 'canary' : 'stable'} release, run this command from the app's directory:\n\nnpx next@canary upgrade --agent=latest`
+ }
+ };
+ }
+ if (channel && channel !== 'canary' && policy === 'experimental-future') {
+ return {
+ affected: null,
+ reference: null,
+ upgrade: {
+ status: 'blocked',
+ reason: `Future Defaults upgrades are not supported for Next.js ${installedVersion}. To upgrade to the latest stable release, run this command from the app's directory:\n\nnpx next@canary upgrade --agent=latest`
+ }
+ };
+ }
+ // Prerelease version ordering does not establish which security fixes it
+ // contains, but stable promotion targets still need advisory validation.
+ let snapshot = null;
+ if (channel !== 'canary') {
+ try {
+ snapshot = {
+ ranges: await readNpmAdvisories([
+ installedVersion
+ ]),
+ reference: NPM_ADVISORIES
+ };
+ } catch {
+ return {
+ affected: null,
+ reference: null,
+ upgrade: {
+ status: 'unknown',
+ reason: 'Could not check for security updates. Please try again.'
+ }
+ };
+ }
+ }
+ const affected = snapshot && !channel ? snapshot.ranges.some((range)=>semver.satisfies(installedVersion, range)) : null;
+ const assessment = {
+ affected,
+ reference: (snapshot == null ? void 0 : snapshot.reference) ?? null
+ };
+ // A dismissed release reminder still checks advisories, but does not need
+ // target metadata unless an advisory applies.
+ if ((policy === 'security' || onlyIfAffected) && !affected) {
+ return {
+ ...assessment,
+ upgrade: {
+ status: 'unaffected',
+ reason: `No security update is needed for Next.js ${installedVersion}.`
+ }
+ };
+ }
+ // Keep a confirmed advisory even when target metadata cannot be read.
+ try {
+ let targetVersion;
+ let references;
+ if (policy === 'security' && snapshot) {
+ const registryURL = `${NPM_REGISTRY}next`;
+ const registry = (await fetchJSON(registryURL)).value;
+ const releases = parseReleases(registry);
+ references = [
+ snapshot.reference,
+ registryURL
+ ];
+ const candidates = securityCandidates(installedVersion, releases);
+ const ranges = [
+ ...snapshot.ranges,
+ ...candidates.length ? await readNpmAdvisories(candidates.map(({ version })=>version)) : []
+ ];
+ try {
+ targetVersion = selectSecurityTarget(installedVersion, releases, ranges).version;
+ } catch (error) {
+ return {
+ ...assessment,
+ upgrade: {
+ status: 'blocked',
+ reason: error.message
+ }
+ };
+ }
+ } else {
+ const release = await fetchLatestRelease(installedVersion);
+ if (!release) {
+ throw new Error(channel === 'canary' ? 'Could not determine the latest Next.js version on the canary dist-tag.' : 'Could not determine the latest stable Next.js version.');
+ }
+ targetVersion = policy === 'experimental-future' && semver.gt(installedVersion, release.version) ? installedVersion : release.version;
+ references = [
+ release.reference
+ ];
+ const releaseKind = channel === 'canary' ? 'canary release' : 'stable release';
+ if (policy === 'latest' && semver.lt(targetVersion, installedVersion)) {
+ return {
+ ...assessment,
+ upgrade: {
+ status: 'unaffected',
+ reason: `Next.js ${installedVersion} is newer than the latest ${releaseKind} ${targetVersion}.`
+ }
+ };
+ }
+ const targetRanges = snapshot && targetVersion !== installedVersion ? await readNpmAdvisories([
+ targetVersion
+ ]) : snapshot == null ? void 0 : snapshot.ranges;
+ if (targetRanges == null ? void 0 : targetRanges.some((range)=>semver.satisfies(targetVersion, range))) {
+ return {
+ ...assessment,
+ upgrade: {
+ status: 'blocked',
+ reason: `Next.js ${targetVersion} is affected by an active advisory.`
+ }
+ };
+ }
+ if (policy === 'latest' && semver.eq(targetVersion, installedVersion)) {
+ return {
+ ...assessment,
+ upgrade: {
+ status: 'unaffected',
+ reason: `Next.js ${installedVersion} is already the latest ${releaseKind}.`
+ }
+ };
+ }
+ }
+ return {
+ ...assessment,
+ upgrade: {
+ status: 'ready',
+ installedVersion,
+ targetVersion,
+ references,
+ futureDefaults: []
+ }
+ };
+ } catch (error) {
+ return {
+ ...assessment,
+ upgrade: {
+ status: 'unknown',
+ reason: error.message
+ }
+ };
+ }
+}
+const NPM_REGISTRY = 'https://registry.npmjs.org/';
+const NPM_ADVISORIES = `${NPM_REGISTRY}-/npm/v1/security/advisories/bulk`;
+async function fetchJSON(url, init = undefined) {
+ try {
+ const response = await fetch(url, {
+ ...init,
+ headers: {
+ Accept: 'application/json',
+ ...init == null ? void 0 : init.headers
+ },
+ signal: AbortSignal.timeout(10000),
+ redirect: 'error'
+ });
+ if (!response.ok) {
+ throw new Error(`HTTP ${response.status}`);
+ }
+ return {
+ value: await response.json()
+ };
+ } catch (error) {
+ throw new Error('Could not fetch upgrade metadata. Please try again.', {
+ cause: error
+ });
+ }
+}
+export function getPrereleaseChannel(version) {
+ var _semver_prerelease;
+ const channel = (_semver_prerelease = semver.prerelease(version)) == null ? void 0 : _semver_prerelease[0];
+ return channel === 'canary' || channel === 'rc' || channel === 'beta' || channel === 'preview' ? channel : null;
+}
+function parseReleases(value) {
+ const data = value;
+ if (!(data == null ? void 0 : data.versions)) {
+ throw new Error('Could not determine a safe Next.js version.');
+ }
+ return Object.entries(data.versions).flatMap(([version, metadata])=>{
+ if (!semver.valid(version) || semver.prerelease(version)) {
+ return [];
+ }
+ if (metadata.version !== version) {
+ throw new Error('Could not determine a safe Next.js version.');
+ }
+ return [
+ {
+ version
+ }
+ ];
+ });
+}
+export function getLatestUpgradeVersion(version, targetVersion) {
+ const channel = getPrereleaseChannel(version);
+ const targetChannel = getPrereleaseChannel(targetVersion);
+ if (!semver.valid(version) || !semver.valid(targetVersion) || semver.prerelease(version) && !channel || semver.prerelease(targetVersion) && !targetChannel || (channel === 'canary' ? targetChannel !== 'canary' : targetChannel !== null) || !semver.gt(targetVersion, version)) {
+ return null;
+ }
+ // Stable releases replacing prereleases still warrant a reminder, even
+ // within the same minor. Patches and consecutive canaries remain explicit.
+ if (!(channel && channel !== 'canary') && semver.major(targetVersion) === semver.major(version) && semver.minor(targetVersion) === semver.minor(version)) {
+ return null;
+ }
+ return targetVersion;
+}
+async function fetchLatestRelease(installedVersion) {
+ const channel = getPrereleaseChannel(installedVersion);
+ const releaseChannel = channel === 'canary' ? 'canary' : 'latest';
+ const reference = `${NPM_REGISTRY}next/${releaseChannel}`;
+ const { value } = await fetchJSON(reference);
+ const release = value;
+ if (!release || !semver.valid(release.version) || channel !== 'canary' && semver.prerelease(release.version) || getPrereleaseChannel(release.version) !== (channel === 'canary' ? 'canary' : null)) {
+ return null;
+ }
+ return {
+ version: release.version,
+ reference
+ };
+}
+// TODO: Record whether each advisory lookup succeeded or failed in upgrade telemetry.
+async function readNpmAdvisories(versions) {
+ let value;
+ try {
+ value = (await fetchJSON(NPM_ADVISORIES, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({
+ next: versions
+ })
+ })).value;
+ } catch (error) {
+ throw new Error('Could not check for security updates. Please try again.', {
+ cause: error
+ });
+ }
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
+ throw new Error('Could not check for security updates.');
+ }
+ const data = value;
+ if (Object.keys(data).some((name)=>name !== 'next')) {
+ throw new Error('Could not check for security updates.');
+ }
+ // The bulk endpoint omits packages with no known vulnerabilities.
+ if (!('next' in data)) {
+ return [];
+ }
+ if (!Array.isArray(data.next)) {
+ throw new Error('Could not check for security updates.');
+ }
+ return data.next.map((finding)=>{
+ if (!finding || typeof finding.vulnerable_versions !== 'string' || !finding.vulnerable_versions.trim()) {
+ throw new Error('Could not check for security updates.');
+ }
+ const range = finding.vulnerable_versions.replace(/,\s*/g, ' ');
+ if (!semver.validRange(range)) {
+ throw new Error('Could not check for security updates.');
+ }
+ return range;
+ });
+}
+function securityCandidates(source, releases) {
+ // Only the newest stable release of each eligible major is considered.
+ const latest = new Map();
+ for (const release of releases){
+ const major = semver.major(release.version);
+ const previous = latest.get(major);
+ if (!previous || semver.gt(release.version, previous.version)) {
+ latest.set(major, release);
+ }
+ }
+ return [
+ ...latest.entries()
+ ].sort(([a], [b])=>a - b).filter(([major, release])=>major >= semver.major(source) && semver.gt(release.version, source)).map(([, release])=>release);
+}
+function selectSecurityTarget(source, releases, ranges) {
+ if (!ranges.some((range)=>semver.satisfies(source, range))) {
+ return;
+ }
+ for (const candidate of securityCandidates(source, releases)){
+ if (!ranges.some((range)=>semver.satisfies(candidate.version, range))) {
+ return candidate;
+ }
+ }
+ throw new Error('No safe Next.js update is currently available.');
+}
+
+//# sourceMappingURL=prepare-upgrade.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/prepare-upgrade.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prepare-upgrade.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..1adcd2c829d28e6e5a97d3d26c0718ab59c20bb8
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prepare-upgrade.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/prepare-upgrade.ts"],"sourcesContent":["import { readFile } from 'fs/promises'\nimport { createRequire } from 'module'\nimport { join } from 'path'\nimport { resetEnv } from '@next/env'\nimport semver from 'next/dist/compiled/semver'\nimport loadConfig from '../../server/config'\nimport { PHASE_INFO } from '../../shared/lib/constants'\nimport {\n getPendingFutureDefaults,\n type FutureDefaultEntry,\n} from './future-defaults'\n\ntype UpgradePreparation =\n | { status: 'unaffected' | 'blocked' | 'unknown'; reason: string }\n | {\n status: 'ready'\n installedVersion: string\n targetVersion: string\n references: string[]\n futureDefaults: FutureDefaultEntry[]\n }\n\nexport async function prepareUpgrade(\n directory: string,\n targetRequest: string = 'security'\n): Promise {\n if (\n targetRequest !== 'security' &&\n targetRequest !== 'latest' &&\n targetRequest !== 'experimental-future'\n ) {\n throw new Error(\n `Unsupported agent upgrade type ${JSON.stringify(targetRequest)}. Expected \"security\", \"latest\", or \"experimental-future\".`\n )\n }\n\n // Resolve from the app: the invoking canary is only the upgrade tooling.\n const requireFromApp = createRequire(join(directory, 'package.json'))\n const installedNext = JSON.parse(\n await readFile(requireFromApp.resolve('next/package.json'), 'utf8')\n ) as {\n version: string\n }\n const installedVersion = installedNext.version\n\n if (!semver.valid(installedVersion)) {\n throw new Error('Could not determine the installed Next.js version.')\n }\n\n const { upgrade } = await getUpgradeAssessment(\n installedVersion,\n targetRequest\n )\n if (upgrade.status !== 'ready' || targetRequest !== 'experimental-future') {\n return upgrade\n }\n\n const config = await loadConfig(PHASE_INFO, directory, {\n silent: true,\n }).finally(resetEnv)\n const pendingFutureDefaults = getPendingFutureDefaults(\n directory,\n config,\n upgrade.targetVersion\n )\n\n if (\n upgrade.targetVersion === installedVersion &&\n pendingFutureDefaults.length === 0\n ) {\n return {\n status: 'unaffected',\n reason: `Next.js ${installedVersion} is current and no applicable Future Defaults are pending.`,\n }\n }\n\n return { ...upgrade, futureDefaults: pendingFutureDefaults }\n}\n\nexport type UpgradeAssessment = {\n // null means advisory assessment is unsupported for this release channel.\n affected: boolean | null\n reference: string | null\n upgrade: UpgradePreparation\n}\n\n// TODO: Cache assessments briefly by installed version, policy, and resolved\n// target to avoid repeating nudge lookups. New advisories can affect the same\n// target, so expire cached results and refresh metadata before execution.\nexport async function getUpgradeAssessment(\n installedVersion: string,\n policy: 'security' | 'latest' | 'experimental-future',\n onlyIfAffected: boolean = false\n): Promise {\n if (!semver.valid(installedVersion)) {\n throw new Error('The running Next.js version is not valid semver.')\n }\n const channel = getPrereleaseChannel(installedVersion)\n if (semver.prerelease(installedVersion) && !channel) {\n throw new Error(\n 'Agent upgrades are not available for this prerelease version of Next.js.'\n )\n }\n if (channel && (policy === 'security' || onlyIfAffected)) {\n return {\n affected: null,\n reference: null,\n upgrade: {\n status: 'blocked',\n reason: `The installed Next.js version (${installedVersion}) is a ${channel} prerelease. Security advisories target stable versions, and prereleases do not reliably follow stable version ordering, so an advisory could be a false positive. To upgrade to the latest ${channel === 'canary' ? 'canary' : 'stable'} release, run this command from the app's directory:\\n\\nnpx next@canary upgrade --agent=latest`,\n },\n }\n }\n if (channel && channel !== 'canary' && policy === 'experimental-future') {\n return {\n affected: null,\n reference: null,\n upgrade: {\n status: 'blocked',\n reason: `Future Defaults upgrades are not supported for Next.js ${installedVersion}. To upgrade to the latest stable release, run this command from the app's directory:\\n\\nnpx next@canary upgrade --agent=latest`,\n },\n }\n }\n // Prerelease version ordering does not establish which security fixes it\n // contains, but stable promotion targets still need advisory validation.\n let snapshot: { ranges: string[]; reference: string } | null = null\n if (channel !== 'canary') {\n try {\n snapshot = {\n ranges: await readNpmAdvisories([installedVersion]),\n reference: NPM_ADVISORIES,\n }\n } catch {\n return {\n affected: null,\n reference: null,\n upgrade: {\n status: 'unknown',\n reason: 'Could not check for security updates. Please try again.',\n },\n }\n }\n }\n const affected =\n snapshot && !channel\n ? snapshot.ranges.some((range) =>\n semver.satisfies(installedVersion, range)\n )\n : null\n const assessment = { affected, reference: snapshot?.reference ?? null }\n\n // A dismissed release reminder still checks advisories, but does not need\n // target metadata unless an advisory applies.\n if ((policy === 'security' || onlyIfAffected) && !affected) {\n return {\n ...assessment,\n upgrade: {\n status: 'unaffected',\n reason: `No security update is needed for Next.js ${installedVersion}.`,\n },\n }\n }\n\n // Keep a confirmed advisory even when target metadata cannot be read.\n try {\n let targetVersion: string\n let references: string[]\n if (policy === 'security' && snapshot) {\n const registryURL = `${NPM_REGISTRY}next`\n const registry = (await fetchJSON(registryURL)).value\n const releases = parseReleases(registry)\n references = [snapshot.reference, registryURL]\n const candidates = securityCandidates(installedVersion, releases)\n const ranges = [\n ...snapshot.ranges,\n ...(candidates.length\n ? await readNpmAdvisories(candidates.map(({ version }) => version))\n : []),\n ]\n try {\n targetVersion = selectSecurityTarget(\n installedVersion,\n releases,\n ranges\n )!.version\n } catch (error) {\n return {\n ...assessment,\n upgrade: { status: 'blocked', reason: (error as Error).message },\n }\n }\n } else {\n const release = await fetchLatestRelease(installedVersion)\n if (!release) {\n throw new Error(\n channel === 'canary'\n ? 'Could not determine the latest Next.js version on the canary dist-tag.'\n : 'Could not determine the latest stable Next.js version.'\n )\n }\n targetVersion =\n policy === 'experimental-future' &&\n semver.gt(installedVersion, release.version)\n ? installedVersion\n : release.version\n references = [release.reference]\n const releaseKind =\n channel === 'canary' ? 'canary release' : 'stable release'\n\n if (policy === 'latest' && semver.lt(targetVersion, installedVersion)) {\n return {\n ...assessment,\n upgrade: {\n status: 'unaffected',\n reason: `Next.js ${installedVersion} is newer than the latest ${releaseKind} ${targetVersion}.`,\n },\n }\n }\n\n const targetRanges =\n snapshot && targetVersion !== installedVersion\n ? await readNpmAdvisories([targetVersion])\n : snapshot?.ranges\n if (\n targetRanges?.some((range) => semver.satisfies(targetVersion, range))\n ) {\n return {\n ...assessment,\n upgrade: {\n status: 'blocked',\n reason: `Next.js ${targetVersion} is affected by an active advisory.`,\n },\n }\n }\n\n if (policy === 'latest' && semver.eq(targetVersion, installedVersion)) {\n return {\n ...assessment,\n upgrade: {\n status: 'unaffected',\n reason: `Next.js ${installedVersion} is already the latest ${releaseKind}.`,\n },\n }\n }\n }\n\n return {\n ...assessment,\n upgrade: {\n status: 'ready',\n installedVersion,\n targetVersion,\n references,\n futureDefaults: [],\n },\n }\n } catch (error) {\n return {\n ...assessment,\n upgrade: { status: 'unknown', reason: (error as Error).message },\n }\n }\n}\n\ntype PackageRelease = {\n version: string\n}\n\nconst NPM_REGISTRY = 'https://registry.npmjs.org/'\nconst NPM_ADVISORIES = `${NPM_REGISTRY}-/npm/v1/security/advisories/bulk`\n\nasync function fetchJSON(\n url: string,\n init: RequestInit | undefined = undefined\n): Promise<{ value: unknown }> {\n try {\n const response = await fetch(url, {\n ...init,\n headers: { Accept: 'application/json', ...init?.headers },\n signal: AbortSignal.timeout(10_000),\n redirect: 'error',\n })\n\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}`)\n }\n\n return { value: await response.json() }\n } catch (error) {\n throw new Error('Could not fetch upgrade metadata. Please try again.', {\n cause: error,\n })\n }\n}\n\nexport function getPrereleaseChannel(version: string): string | null {\n const channel = semver.prerelease(version)?.[0]\n return channel === 'canary' ||\n channel === 'rc' ||\n channel === 'beta' ||\n channel === 'preview'\n ? channel\n : null\n}\n\nfunction parseReleases(value: unknown): PackageRelease[] {\n const data = value as {\n versions:\n | Record<\n string,\n {\n version: string\n }\n >\n | undefined\n }\n\n if (!data?.versions) {\n throw new Error('Could not determine a safe Next.js version.')\n }\n\n return Object.entries(data.versions).flatMap(([version, metadata]) => {\n if (!semver.valid(version) || semver.prerelease(version)) {\n return []\n }\n\n if (metadata.version !== version) {\n throw new Error('Could not determine a safe Next.js version.')\n }\n\n return [{ version }]\n })\n}\n\nexport function getLatestUpgradeVersion(\n version: string,\n targetVersion: string\n) {\n const channel = getPrereleaseChannel(version)\n const targetChannel = getPrereleaseChannel(targetVersion)\n if (\n !semver.valid(version) ||\n !semver.valid(targetVersion) ||\n (semver.prerelease(version) && !channel) ||\n (semver.prerelease(targetVersion) && !targetChannel) ||\n (channel === 'canary'\n ? targetChannel !== 'canary'\n : targetChannel !== null) ||\n !semver.gt(targetVersion, version)\n ) {\n return null\n }\n // Stable releases replacing prereleases still warrant a reminder, even\n // within the same minor. Patches and consecutive canaries remain explicit.\n if (\n !(channel && channel !== 'canary') &&\n semver.major(targetVersion) === semver.major(version) &&\n semver.minor(targetVersion) === semver.minor(version)\n ) {\n return null\n }\n return targetVersion\n}\n\nasync function fetchLatestRelease(installedVersion: string): Promise<{\n version: string\n reference: string\n} | null> {\n const channel = getPrereleaseChannel(installedVersion)\n const releaseChannel = channel === 'canary' ? 'canary' : 'latest'\n const reference = `${NPM_REGISTRY}next/${releaseChannel}`\n const { value } = await fetchJSON(reference)\n const release = value as { version: string } | null\n\n if (\n !release ||\n !semver.valid(release.version) ||\n (channel !== 'canary' && semver.prerelease(release.version)) ||\n getPrereleaseChannel(release.version) !==\n (channel === 'canary' ? 'canary' : null)\n ) {\n return null\n }\n\n return { version: release.version, reference }\n}\n\n// TODO: Record whether each advisory lookup succeeded or failed in upgrade telemetry.\nasync function readNpmAdvisories(versions: string[]): Promise {\n let value: unknown\n try {\n value = (\n await fetchJSON(NPM_ADVISORIES, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ next: versions }),\n })\n ).value\n } catch (error) {\n throw new Error('Could not check for security updates. Please try again.', {\n cause: error,\n })\n }\n\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n throw new Error('Could not check for security updates.')\n }\n\n const data = value as Record\n\n if (Object.keys(data).some((name) => name !== 'next')) {\n throw new Error('Could not check for security updates.')\n }\n\n // The bulk endpoint omits packages with no known vulnerabilities.\n if (!('next' in data)) {\n return []\n }\n\n if (!Array.isArray(data.next)) {\n throw new Error('Could not check for security updates.')\n }\n\n return data.next.map((finding) => {\n if (\n !finding ||\n typeof finding.vulnerable_versions !== 'string' ||\n !finding.vulnerable_versions.trim()\n ) {\n throw new Error('Could not check for security updates.')\n }\n const range = finding.vulnerable_versions.replace(/,\\s*/g, ' ')\n if (!semver.validRange(range)) {\n throw new Error('Could not check for security updates.')\n }\n return range\n })\n}\n\nfunction securityCandidates(\n source: string,\n releases: PackageRelease[]\n): PackageRelease[] {\n // Only the newest stable release of each eligible major is considered.\n const latest = new Map()\n for (const release of releases) {\n const major = semver.major(release.version)\n const previous = latest.get(major)\n if (!previous || semver.gt(release.version, previous.version)) {\n latest.set(major, release)\n }\n }\n return [...latest.entries()]\n .sort(([a], [b]) => a - b)\n .filter(\n ([major, release]) =>\n major >= semver.major(source) && semver.gt(release.version, source)\n )\n .map(([, release]) => release)\n}\n\nfunction selectSecurityTarget(\n source: string,\n releases: PackageRelease[],\n ranges: string[]\n): PackageRelease | undefined {\n if (!ranges.some((range) => semver.satisfies(source, range))) {\n return\n }\n\n for (const candidate of securityCandidates(source, releases)) {\n if (!ranges.some((range) => semver.satisfies(candidate.version, range))) {\n return candidate\n }\n }\n\n throw new Error('No safe Next.js update is currently available.')\n}\n"],"names":["readFile","createRequire","join","resetEnv","semver","loadConfig","PHASE_INFO","getPendingFutureDefaults","prepareUpgrade","directory","targetRequest","Error","JSON","stringify","requireFromApp","installedNext","parse","resolve","installedVersion","version","valid","upgrade","getUpgradeAssessment","status","config","silent","finally","pendingFutureDefaults","targetVersion","length","reason","futureDefaults","policy","onlyIfAffected","channel","getPrereleaseChannel","prerelease","affected","reference","snapshot","ranges","readNpmAdvisories","NPM_ADVISORIES","some","range","satisfies","assessment","references","registryURL","NPM_REGISTRY","registry","fetchJSON","value","releases","parseReleases","candidates","securityCandidates","map","selectSecurityTarget","error","message","release","fetchLatestRelease","gt","releaseKind","lt","targetRanges","eq","url","init","undefined","response","fetch","headers","Accept","signal","AbortSignal","timeout","redirect","ok","json","cause","data","versions","Object","entries","flatMap","metadata","getLatestUpgradeVersion","targetChannel","major","minor","releaseChannel","method","body","next","Array","isArray","keys","name","finding","vulnerable_versions","trim","replace","validRange","source","latest","Map","previous","get","set","sort","a","b","filter","candidate"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAa;AACtC,SAASC,aAAa,QAAQ,SAAQ;AACtC,SAASC,IAAI,QAAQ,OAAM;AAC3B,SAASC,QAAQ,QAAQ,YAAW;AACpC,OAAOC,YAAY,4BAA2B;AAC9C,OAAOC,gBAAgB,sBAAqB;AAC5C,SAASC,UAAU,QAAQ,6BAA4B;AACvD,SACEC,wBAAwB,QAEnB,oBAAmB;AAY1B,OAAO,eAAeC,eACpBC,SAAiB,EACjBC,gBAAwB,UAAU;IAElC,IACEA,kBAAkB,cAClBA,kBAAkB,YAClBA,kBAAkB,uBAClB;QACA,MAAM,IAAIC,MACR,CAAC,+BAA+B,EAAEC,KAAKC,SAAS,CAACH,eAAe,0DAA0D,CAAC;IAE/H;IAEA,yEAAyE;IACzE,MAAMI,iBAAiBb,cAAcC,KAAKO,WAAW;IACrD,MAAMM,gBAAgBH,KAAKI,KAAK,CAC9B,MAAMhB,SAASc,eAAeG,OAAO,CAAC,sBAAsB;IAI9D,MAAMC,mBAAmBH,cAAcI,OAAO;IAE9C,IAAI,CAACf,OAAOgB,KAAK,CAACF,mBAAmB;QACnC,MAAM,IAAIP,MAAM;IAClB;IAEA,MAAM,EAAEU,OAAO,EAAE,GAAG,MAAMC,qBACxBJ,kBACAR;IAEF,IAAIW,QAAQE,MAAM,KAAK,WAAWb,kBAAkB,uBAAuB;QACzE,OAAOW;IACT;IAEA,MAAMG,SAAS,MAAMnB,WAAWC,YAAYG,WAAW;QACrDgB,QAAQ;IACV,GAAGC,OAAO,CAACvB;IACX,MAAMwB,wBAAwBpB,yBAC5BE,WACAe,QACAH,QAAQO,aAAa;IAGvB,IACEP,QAAQO,aAAa,KAAKV,oBAC1BS,sBAAsBE,MAAM,KAAK,GACjC;QACA,OAAO;YACLN,QAAQ;YACRO,QAAQ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I,CAACkB,YAAYxG,OAAO2D,EAAE,CAACF,QAAQ1C,OAAO,EAAEyF,SAASzF,OAAO,GAAG;YAC7DuF,OAAOI,GAAG,CAACpB,OAAO7B;QACpB;IACF;IACA,OAAO;WAAI6C,OAAOrB,OAAO;KAAG,CACzB0B,IAAI,CAAC,CAAC,CAACC,EAAE,EAAE,CAACC,EAAE,GAAKD,IAAIC,GACvBC,MAAM,CACL,CAAC,CAACxB,OAAO7B,QAAQ,GACf6B,SAAStF,OAAOsF,KAAK,CAACe,WAAWrG,OAAO2D,EAAE,CAACF,QAAQ1C,OAAO,EAAEsF,SAE/DhD,GAAG,CAAC,CAAC,GAAGI,QAAQ,GAAKA;AAC1B;AAEA,SAASH,qBACP+C,MAAc,EACdpD,QAA0B,EAC1Bb,MAAgB;IAEhB,IAAI,CAACA,OAAOG,IAAI,CAAC,CAACC,QAAUxC,OAAOyC,SAAS,CAAC4D,QAAQ7D,SAAS;QAC5D;IACF;IAEA,KAAK,MAAMuE,aAAa3D,mBAAmBiD,QAAQpD,UAAW;QAC5D,IAAI,CAACb,OAAOG,IAAI,CAAC,CAACC,QAAUxC,OAAOyC,SAAS,CAACsE,UAAUhG,OAAO,EAAEyB,SAAS;YACvE,OAAOuE;QACT;IACF;IAEA,MAAM,IAAIxG,MAAM;AAClB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt-output.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt-output.js
new file mode 100644
index 0000000000000000000000000000000000000000..350666e4519ec90cf77be5d3f6fe43fb9f26f955
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt-output.js
@@ -0,0 +1,161 @@
+import path from 'path';
+import * as Log from '../../build/output/log';
+import { Telemetry } from '../../telemetry/storage';
+import { once } from 'events';
+import { setTimeout as sleep } from 'timers/promises';
+import { isColorSupported } from '../picocolors';
+// Keep at most this much while the menu is open, so a menu left open doesn't
+// grow memory without bound.
+const MAX_HELD_BYTES = 10 * 1024 * 1024;
+// All output of the child (and anything it starts) comes through here, so it
+// can be held while the upgrade menu is on screen.
+export function createPromptOutput() {
+ // print: show now. hold: keep for later. drop: throw away.
+ let mode = 'print';
+ // One list for stdout and stderr keeps their order.
+ let held = [];
+ let heldBytes = 0;
+ let droppedBytes = 0;
+ function forward(destination) {
+ return (chunk)=>{
+ if (mode === 'print') {
+ destination.write(chunk);
+ } else if (mode === 'hold') {
+ held.push([
+ destination,
+ chunk
+ ]);
+ heldBytes += chunk.length;
+ // Over the limit: drop the oldest output.
+ while(heldBytes > MAX_HELD_BYTES && held.length > 1){
+ const [, oldest] = held.shift();
+ heldBytes -= oldest.length;
+ droppedBytes += oldest.length;
+ }
+ }
+ };
+ }
+ return {
+ attach (child) {
+ child.stdout.on('data', forward(process.stdout));
+ child.stderr.on('data', forward(process.stderr));
+ },
+ // The menu opened.
+ hold () {
+ mode = 'hold';
+ },
+ // The menu closed: show what was held.
+ release () {
+ mode = 'print';
+ if (droppedBytes > 0) {
+ Log.warn(`${droppedBytes} bytes of earlier output were dropped while the upgrade menu was open.`);
+ }
+ for (const [destination, chunk] of held){
+ destination.write(chunk);
+ }
+ held = [];
+ },
+ // Upgrade was chosen and the child is stopping, so its output doesn't
+ // matter.
+ discard () {
+ mode = 'drop';
+ held = [];
+ }
+ };
+}
+// Read what is left in the pipes after the child exits. Don't wait long, in
+// case something the child started keeps them open.
+export async function drainPromptOutput(child) {
+ var _child_stderr;
+ // The pipes are often closed by the time 'exit' fires, and then 'close' has
+ // already been sent.
+ if (!child.stdout || child.stdout.destroyed && ((_child_stderr = child.stderr) == null ? void 0 : _child_stderr.destroyed)) {
+ return;
+ }
+ await Promise.race([
+ once(child, 'close'),
+ sleep(500)
+ ]);
+}
+// A pipe is not a terminal. Like other tools that pipe a child's output, pass
+// FORCE_COLOR on. Tell Next's own output code that the output still ends up on
+// a terminal, and how wide it is.
+export function getPromptOutputEnv() {
+ const { FORCE_COLOR, NODE_DISABLE_COLORS } = process.env;
+ return {
+ FORCE_COLOR: // An empty FORCE_COLOR means "on" to Node but "unset" to picocolors.
+ FORCE_COLOR || (isColorSupported && !NODE_DISABLE_COLORS ? '1' : FORCE_COLOR),
+ NEXT_PRIVATE_PROMPT_OUTPUT: '1',
+ NEXT_PRIVATE_TERMINAL_COLUMNS: process.stdout.columns ? String(process.stdout.columns) : undefined
+ };
+}
+// A child on the terminal puts it back in normal mode when it exits, which
+// stops the menu from reading keys. Put raw mode back.
+export function reassertRawMode() {
+ const stdin = process.stdin;
+ if (stdin.isTTY && stdin.isRaw) {
+ // Node skips setting a mode it thinks is already set, so toggle.
+ stdin.setRawMode(false);
+ stdin.setRawMode(true);
+ }
+}
+let pendingTelemetry;
+// Shows the menu while the child keeps working. Returns what to do next:
+// upgrade, interrupt, or carry on (null).
+export async function showUpgradeMenu(output, options) {
+ const { dir, context, command, signal, initialAssessment } = options;
+ const { nudgeUpgrade } = require('./nudge');
+ if (options.telemetryDisabled) {
+ process.env.NEXT_TELEMETRY_DISABLED = options.telemetryDisabled;
+ }
+ const telemetry = new Telemetry({
+ distDir: path.join(dir, context.distDir),
+ skipNotify: true
+ });
+ let nudgeId = null;
+ // onNudgeId runs as the menu draws, so holding starts at exactly that point.
+ const action = await nudgeUpgrade(dir, context, command, signal, initialAssessment, {
+ telemetry,
+ onNudgeId (id) {
+ nudgeId = id;
+ output.hold();
+ }
+ }).catch((error)=>{
+ Log.warn(`Could not offer the upgrade: ${String(error)}`);
+ });
+ // The answer is already being sent. Don't wait for it here, or Ctrl+C would
+ // be ignored until it is done.
+ pendingTelemetry = telemetry.flush();
+ // Upgrade. The caller drops or shows what was held.
+ const policy = context.experimental.agentUpgrade;
+ if (action === 'update' && policy && !signal.aborted) {
+ return {
+ policy,
+ nudgeId
+ };
+ }
+ // Skip, Ctrl+C, or closed: show what was held.
+ output.release();
+ return action === 'interrupt' && !signal.aborted ? 'interrupt' : null;
+}
+// The menu closes right away when cancelled, but it may still be waiting on a
+// network check before showing. Don't wait on that.
+export async function closedUpgradeMenu(menu) {
+ await Promise.race([
+ menu,
+ sleep(1000, undefined, {
+ ref: false
+ })
+ ]);
+}
+// Before exiting, give the menu's telemetry a moment to finish sending.
+export async function flushUpgradeTelemetry() {
+ await Promise.race([
+ pendingTelemetry,
+ sleep(1000, undefined, {
+ ref: false
+ })
+ ]);
+}
+
+//# sourceMappingURL=prompt-output.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt-output.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt-output.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..de1d9bc69446ff8bf4b1cb90a78e3a0a6c571f08
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt-output.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/prompt-output.ts"],"sourcesContent":["import path from 'path'\nimport * as Log from '../../build/output/log'\nimport { Telemetry } from '../../telemetry/storage'\n\nimport { once } from 'events'\nimport { setTimeout as sleep } from 'timers/promises'\nimport { isColorSupported } from '../picocolors'\n\nimport type { ChildProcess } from 'child_process'\nimport type { NudgeKind, UpgradeContext, UpgradeReminder } from './nudge'\n\ntype PromptOutput = ReturnType\n\nexport type UpgradeMenuResult =\n | { policy: NudgeKind; nudgeId: string | null }\n | 'interrupt'\n | null\n\n// Keep at most this much while the menu is open, so a menu left open doesn't\n// grow memory without bound.\nconst MAX_HELD_BYTES = 10 * 1024 * 1024\n\n// All output of the child (and anything it starts) comes through here, so it\n// can be held while the upgrade menu is on screen.\nexport function createPromptOutput() {\n // print: show now. hold: keep for later. drop: throw away.\n let mode: 'print' | 'hold' | 'drop' = 'print'\n // One list for stdout and stderr keeps their order.\n let held: Array<[NodeJS.WriteStream, Buffer]> = []\n let heldBytes = 0\n let droppedBytes = 0\n\n function forward(destination: NodeJS.WriteStream) {\n return (chunk: Buffer) => {\n if (mode === 'print') {\n destination.write(chunk)\n } else if (mode === 'hold') {\n held.push([destination, chunk])\n heldBytes += chunk.length\n // Over the limit: drop the oldest output.\n while (heldBytes > MAX_HELD_BYTES && held.length > 1) {\n const [, oldest] = held.shift()!\n heldBytes -= oldest.length\n droppedBytes += oldest.length\n }\n }\n }\n }\n\n return {\n attach(child: ChildProcess) {\n child.stdout!.on('data', forward(process.stdout))\n child.stderr!.on('data', forward(process.stderr))\n },\n // The menu opened.\n hold() {\n mode = 'hold'\n },\n // The menu closed: show what was held.\n release() {\n mode = 'print'\n if (droppedBytes > 0) {\n Log.warn(\n `${droppedBytes} bytes of earlier output were dropped while the upgrade menu was open.`\n )\n }\n for (const [destination, chunk] of held) {\n destination.write(chunk)\n }\n held = []\n },\n // Upgrade was chosen and the child is stopping, so its output doesn't\n // matter.\n discard() {\n mode = 'drop'\n held = []\n },\n }\n}\n\n// Read what is left in the pipes after the child exits. Don't wait long, in\n// case something the child started keeps them open.\nexport async function drainPromptOutput(child: ChildProcess) {\n // The pipes are often closed by the time 'exit' fires, and then 'close' has\n // already been sent.\n if (!child.stdout || (child.stdout.destroyed && child.stderr?.destroyed)) {\n return\n }\n await Promise.race([once(child, 'close'), sleep(500)])\n}\n\n// A pipe is not a terminal. Like other tools that pipe a child's output, pass\n// FORCE_COLOR on. Tell Next's own output code that the output still ends up on\n// a terminal, and how wide it is.\nexport function getPromptOutputEnv() {\n const { FORCE_COLOR, NODE_DISABLE_COLORS } = process.env\n return {\n FORCE_COLOR:\n // An empty FORCE_COLOR means \"on\" to Node but \"unset\" to picocolors.\n FORCE_COLOR ||\n (isColorSupported && !NODE_DISABLE_COLORS ? '1' : FORCE_COLOR),\n NEXT_PRIVATE_PROMPT_OUTPUT: '1',\n NEXT_PRIVATE_TERMINAL_COLUMNS: process.stdout.columns\n ? String(process.stdout.columns)\n : undefined,\n }\n}\n\n// A child on the terminal puts it back in normal mode when it exits, which\n// stops the menu from reading keys. Put raw mode back.\nexport function reassertRawMode() {\n const stdin = process.stdin\n if (stdin.isTTY && stdin.isRaw) {\n // Node skips setting a mode it thinks is already set, so toggle.\n stdin.setRawMode(false)\n stdin.setRawMode(true)\n }\n}\n\nlet pendingTelemetry: Promise | undefined\n\n// Shows the menu while the child keeps working. Returns what to do next:\n// upgrade, interrupt, or carry on (null).\nexport async function showUpgradeMenu(\n output: PromptOutput,\n options: {\n dir: string\n context: UpgradeContext\n command: 'dev' | 'build'\n signal: AbortSignal\n initialAssessment: Promise | null\n // The child's NEXT_TELEMETRY_DISABLED. It loaded .env; this process did\n // not.\n telemetryDisabled: string | undefined\n }\n): Promise {\n const { dir, context, command, signal, initialAssessment } = options\n const { nudgeUpgrade } = require('./nudge') as typeof import('./nudge')\n\n if (options.telemetryDisabled) {\n process.env.NEXT_TELEMETRY_DISABLED = options.telemetryDisabled\n }\n const telemetry = new Telemetry({\n distDir: path.join(dir, context.distDir),\n skipNotify: true,\n })\n let nudgeId: string | null = null\n\n // onNudgeId runs as the menu draws, so holding starts at exactly that point.\n const action = await nudgeUpgrade(\n dir,\n context,\n command,\n signal,\n initialAssessment,\n {\n telemetry,\n onNudgeId(id) {\n nudgeId = id\n output.hold()\n },\n }\n ).catch((error) => {\n Log.warn(`Could not offer the upgrade: ${String(error)}`)\n })\n\n // The answer is already being sent. Don't wait for it here, or Ctrl+C would\n // be ignored until it is done.\n pendingTelemetry = telemetry.flush()\n\n // Upgrade. The caller drops or shows what was held.\n const policy = context.experimental.agentUpgrade\n if (action === 'update' && policy && !signal.aborted) {\n return { policy, nudgeId }\n }\n\n // Skip, Ctrl+C, or closed: show what was held.\n output.release()\n return action === 'interrupt' && !signal.aborted ? 'interrupt' : null\n}\n\n// The menu closes right away when cancelled, but it may still be waiting on a\n// network check before showing. Don't wait on that.\nexport async function closedUpgradeMenu(menu: Promise | undefined) {\n await Promise.race([menu, sleep(1000, undefined, { ref: false })])\n}\n\n// Before exiting, give the menu's telemetry a moment to finish sending.\nexport async function flushUpgradeTelemetry() {\n await Promise.race([pendingTelemetry, sleep(1000, undefined, { ref: false })])\n}\n"],"names":["path","Log","Telemetry","once","setTimeout","sleep","isColorSupported","MAX_HELD_BYTES","createPromptOutput","mode","held","heldBytes","droppedBytes","forward","destination","chunk","write","push","length","oldest","shift","attach","child","stdout","on","process","stderr","hold","release","warn","discard","drainPromptOutput","destroyed","Promise","race","getPromptOutputEnv","FORCE_COLOR","NODE_DISABLE_COLORS","env","NEXT_PRIVATE_PROMPT_OUTPUT","NEXT_PRIVATE_TERMINAL_COLUMNS","columns","String","undefined","reassertRawMode","stdin","isTTY","isRaw","setRawMode","pendingTelemetry","showUpgradeMenu","output","options","dir","context","command","signal","initialAssessment","nudgeUpgrade","require","telemetryDisabled","NEXT_TELEMETRY_DISABLED","telemetry","distDir","join","skipNotify","nudgeId","action","onNudgeId","id","catch","error","flush","policy","experimental","agentUpgrade","aborted","closedUpgradeMenu","menu","ref","flushUpgradeTelemetry"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AACvB,YAAYC,SAAS,yBAAwB;AAC7C,SAASC,SAAS,QAAQ,0BAAyB;AAEnD,SAASC,IAAI,QAAQ,SAAQ;AAC7B,SAASC,cAAcC,KAAK,QAAQ,kBAAiB;AACrD,SAASC,gBAAgB,QAAQ,gBAAe;AAYhD,6EAA6E;AAC7E,6BAA6B;AAC7B,MAAMC,iBAAiB,KAAK,OAAO;AAEnC,6EAA6E;AAC7E,mDAAmD;AACnD,OAAO,SAASC;IACd,2DAA2D;IAC3D,IAAIC,OAAkC;IACtC,oDAAoD;IACpD,IAAIC,OAA4C,EAAE;IAClD,IAAIC,YAAY;IAChB,IAAIC,eAAe;IAEnB,SAASC,QAAQC,WAA+B;QAC9C,OAAO,CAACC;YACN,IAAIN,SAAS,SAAS;gBACpBK,YAAYE,KAAK,CAACD;YACpB,OAAO,IAAIN,SAAS,QAAQ;gBAC1BC,KAAKO,IAAI,CAAC;oBAACH;oBAAaC;iBAAM;gBAC9BJ,aAAaI,MAAMG,MAAM;gBACzB,0CAA0C;gBAC1C,MAAOP,YAA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AAE;QACpD,OAAO;YAAEH;YAAQP;QAAQ;IAC3B;IAEA,+CAA+C;IAC/Cf,OAAOvB,OAAO;IACd,OAAOuC,WAAW,eAAe,CAACX,OAAOoB,OAAO,GAAG,cAAc;AACnE;AAEA,8EAA8E;AAC9E,oDAAoD;AACpD,OAAO,eAAeC,kBAAkBC,IAAkC;IACxE,MAAM7C,QAAQC,IAAI,CAAC;QAAC4C;QAAMzE,MAAM,MAAMsC,WAAW;YAAEoC,KAAK;QAAM;KAAG;AACnE;AAEA,wEAAwE;AACxE,OAAO,eAAeC;IACpB,MAAM/C,QAAQC,IAAI,CAAC;QAACe;QAAkB5C,MAAM,MAAMsC,WAAW;YAAEoC,KAAK;QAAM;KAAG;AAC/E","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt.js
new file mode 100644
index 0000000000000000000000000000000000000000..bbb3c58c9c9067dacf3cf21ee79ad123af27d480
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt.js
@@ -0,0 +1,144 @@
+import { emitKeypressEvents } from 'readline';
+import { PassThrough } from 'stream';
+import cliSelect from 'next/dist/compiled/cli-select';
+import { bold, cyan } from '../picocolors';
+export async function promptUpgrade({ message, signal, canUpdate, onShown }) {
+ if (signal.aborted) {
+ return 'skip';
+ }
+ const input = process.stdin;
+ const terminal = process.stdout;
+ const values = {
+ ...canUpdate ? {
+ update: 'Upgrade now'
+ } : {},
+ skip: 'Skip',
+ dismiss: 'Skip until next version'
+ };
+ const labels = Object.values(values);
+ const heading = `${message}\n\n`;
+ const wasRaw = input.isRaw ?? false;
+ const wasFlowing = input.readableFlowing;
+ // Isolate cancellation from other consumers of stdin. cli-select can close
+ // this stream without changing the real terminal's original raw/flow state.
+ const keys = Object.assign(new PassThrough(), {
+ setRawMode () {}
+ });
+ let interrupted = false;
+ let cancelled = false;
+ let resized = false;
+ let selectedIndex = 0;
+ let shown = false;
+ const renderValue = (value, selected)=>{
+ if (value === labels[0]) {
+ // We own this screen. Redraw from the top instead of relying on
+ // cli-select's one-row-per-choice cursor movement when choices wrap.
+ terminal.write(`\x1b[H\x1b[2J${heading}`);
+ // Redraws must not count the same rendered menu as another nudge.
+ if (!shown) {
+ shown = true;
+ onShown == null ? void 0 : onShown();
+ }
+ }
+ if (selected) {
+ selectedIndex = labels.indexOf(value);
+ }
+ return selected ? cyan(bold(value)) : value;
+ };
+ const cancel = ()=>{
+ cancelled = true;
+ keys.emit('keypress', '', {
+ name: 'escape'
+ });
+ };
+ const onKey = (text, key)=>{
+ if ((key == null ? void 0 : key.ctrl) && key.name === 'c') {
+ interrupted = true;
+ }
+ if ((key == null ? void 0 : key.name) === 'escape') {
+ cancelled = true;
+ }
+ keys.emit('keypress', text, key);
+ };
+ const onResize = ()=>{
+ resized = true;
+ // A terminal write can emit resize while cli-select is still opening.
+ // Wait until its selection callback is installed before cancelling it.
+ queueMicrotask(()=>{
+ if (resized && !restored) {
+ keys.emit('keypress', '', {
+ name: 'escape'
+ });
+ }
+ });
+ };
+ let restored = false;
+ const restore = ()=>{
+ if (restored) {
+ return;
+ }
+ restored = true;
+ input.removeListener('keypress', onKey);
+ terminal.removeListener('resize', onResize);
+ signal.removeEventListener('abort', cancel);
+ process.removeListener('exit', restore);
+ keys.destroy();
+ try {
+ input.setRawMode(wasRaw);
+ } finally{
+ if (wasFlowing !== true) {
+ input.pause();
+ }
+ terminal.write('\x1b[?1049l\x1b[?25h');
+ }
+ };
+ // CLI signal handlers may exit synchronously, before the promise settles.
+ process.once('exit', restore);
+ try {
+ // Keep startup output on the normal screen while the menu owns the terminal.
+ terminal.write('\x1b[?1049h');
+ emitKeypressEvents(input);
+ input.on('keypress', onKey);
+ terminal.on('resize', onResize);
+ signal.addEventListener('abort', cancel, {
+ once: true
+ });
+ input.setRawMode(true);
+ input.resume();
+ while(true){
+ resized = false;
+ const selection = cliSelect({
+ values,
+ defaultValue: selectedIndex,
+ selected: cyan('❯'),
+ unselected: ' ',
+ indentation: 2,
+ cleanup: true,
+ // cli-select types inputStream as a WriteStream, but only consumes
+ // keypress events and the raw-mode methods supplied by this proxy.
+ inputStream: keys,
+ outputStream: terminal,
+ valueRenderer: renderValue
+ });
+ if (signal.aborted || cancelled) {
+ cancel();
+ }
+ try {
+ const { id } = await selection;
+ return signal.aborted || cancelled ? 'skip' : id;
+ } catch (error) {
+ // cli-select rejects without a reason for Escape / Ctrl+C.
+ if (error) {
+ throw error;
+ }
+ if (!resized || signal.aborted || cancelled || interrupted) {
+ return interrupted ? 'interrupt' : 'skip';
+ }
+ }
+ }
+ } finally{
+ restore();
+ }
+}
+
+//# sourceMappingURL=prompt.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..a8406a6deea4e2f2ac3e34c970eb53b1b9f4af00
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/prompt.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/prompt.ts"],"sourcesContent":["import { emitKeypressEvents, type Key } from 'readline'\nimport { PassThrough } from 'stream'\nimport cliSelect from 'next/dist/compiled/cli-select'\nimport { bold, cyan } from '../picocolors'\n\nexport type UpgradeAction = 'update' | 'skip' | 'dismiss' | 'interrupt'\n\nexport async function promptUpgrade({\n message,\n signal,\n canUpdate,\n onShown,\n}: {\n message: string\n signal: AbortSignal\n canUpdate: boolean\n onShown: (() => void) | null\n}): Promise {\n if (signal.aborted) {\n return 'skip'\n }\n const input = process.stdin\n const terminal = process.stdout\n const values = {\n ...(canUpdate ? { update: 'Upgrade now' } : {}),\n skip: 'Skip',\n dismiss: 'Skip until next version',\n }\n const labels = Object.values(values)\n const heading = `${message}\\n\\n`\n const wasRaw = input.isRaw ?? false\n const wasFlowing = input.readableFlowing\n // Isolate cancellation from other consumers of stdin. cli-select can close\n // this stream without changing the real terminal's original raw/flow state.\n const keys = Object.assign(new PassThrough(), { setRawMode() {} })\n let interrupted = false\n let cancelled = false\n let resized = false\n let selectedIndex = 0\n let shown = false\n const renderValue = (value: string, selected: boolean) => {\n if (value === labels[0]) {\n // We own this screen. Redraw from the top instead of relying on\n // cli-select's one-row-per-choice cursor movement when choices wrap.\n terminal.write(`\\x1b[H\\x1b[2J${heading}`)\n\n // Redraws must not count the same rendered menu as another nudge.\n if (!shown) {\n shown = true\n onShown?.()\n }\n }\n if (selected) {\n selectedIndex = labels.indexOf(value)\n }\n return selected ? cyan(bold(value)) : value\n }\n const cancel = () => {\n cancelled = true\n keys.emit('keypress', '', { name: 'escape' })\n }\n const onKey = (text: string, key: Key) => {\n if (key?.ctrl && key.name === 'c') {\n interrupted = true\n }\n if (key?.name === 'escape') {\n cancelled = true\n }\n keys.emit('keypress', text, key)\n }\n const onResize = () => {\n resized = true\n // A terminal write can emit resize while cli-select is still opening.\n // Wait until its selection callback is installed before cancelling it.\n queueMicrotask(() => {\n if (resized && !restored) {\n keys.emit('keypress', '', { name: 'escape' })\n }\n })\n }\n let restored = false\n const restore = () => {\n if (restored) {\n return\n }\n restored = true\n input.removeListener('keypress', onKey)\n terminal.removeListener('resize', onResize)\n signal.removeEventListener('abort', cancel)\n process.removeListener('exit', restore)\n keys.destroy()\n try {\n input.setRawMode(wasRaw)\n } finally {\n if (wasFlowing !== true) {\n input.pause()\n }\n terminal.write('\\x1b[?1049l\\x1b[?25h')\n }\n }\n // CLI signal handlers may exit synchronously, before the promise settles.\n process.once('exit', restore)\n try {\n // Keep startup output on the normal screen while the menu owns the terminal.\n terminal.write('\\x1b[?1049h')\n emitKeypressEvents(input)\n input.on('keypress', onKey)\n terminal.on('resize', onResize)\n signal.addEventListener('abort', cancel, { once: true })\n input.setRawMode(true)\n input.resume()\n while (true) {\n resized = false\n const selection = cliSelect({\n values,\n defaultValue: selectedIndex,\n selected: cyan('❯'),\n unselected: ' ',\n indentation: 2,\n cleanup: true,\n // cli-select types inputStream as a WriteStream, but only consumes\n // keypress events and the raw-mode methods supplied by this proxy.\n inputStream: keys as unknown as NodeJS.WriteStream,\n outputStream: terminal,\n valueRenderer: renderValue,\n })\n if (signal.aborted || cancelled) {\n cancel()\n }\n try {\n const { id } = await selection\n return signal.aborted || cancelled ? 'skip' : (id as UpgradeAction)\n } catch (error) {\n // cli-select rejects without a reason for Escape / Ctrl+C.\n if (error) {\n throw error\n }\n if (!resized || signal.aborted || cancelled || interrupted) {\n return interrupted ? 'interrupt' : 'skip'\n }\n }\n }\n } finally {\n restore()\n }\n}\n"],"names":["emitKeypressEvents","PassThrough","cliSelect","bold","cyan","promptUpgrade","message","signal","canUpdate","onShown","aborted","input","process","stdin","terminal","stdout","values","update","skip","dismiss","labels","Object","heading","wasRaw","isRaw","wasFlowing","readableFlowing","keys","assign","setRawMode","interrupted","cancelled","resized","selectedIndex","shown","renderValue","value","selected","write","indexOf","cancel","emit","name","onKey","text","key","ctrl","onResize","queueMicrotask","restored","restore","removeListener","removeEventListener","destroy","pause","once","on","addEventListener","resume","selection","defaultValue","unselected","indentation","cleanup","inputStream","outputStream","valueRenderer","id","error"],"mappings":"AAAA,SAASA,kBAAkB,QAAkB,WAAU;AACvD,SAASC,WAAW,QAAQ,SAAQ;AACpC,OAAOC,eAAe,gCAA+B;AACrD,SAASC,IAAI,EAAEC,IAAI,QAAQ,gBAAe;AAI1C,OAAO,eAAeC,cAAc,EAClCC,OAAO,EACPC,MAAM,EACNC,SAAS,EACTC,OAAO,EAMR;IACC,IAAIF,OAAOG,OAAO,EAAE;QAClB,OAAO;IACT;IACA,MAAMC,QAAQC,QAAQC,KAAK;IAC3B,MAAMC,WAAWF,QAAQG,MAAM;IAC/B,MAAMC,SAAS;QACb,GAAIR,YAAY;YAAES,QAAQ;QAAc,IAAI,CAAC,CAAC;QAC9CC,MAAM;QACNC,SAAS;IACX;IACA,MAAMC,SAASC,OAA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AOA,cAAc,cAAc;gBACrC;YACF;QACF;IACF,SAAU;QACRoB;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/run-child-process.js b/e-commerce/node_modules/next/dist/esm/lib/upgrade/run-child-process.js
new file mode 100644
index 0000000000000000000000000000000000000000..5f2caf2af91f0ec2e2369a51dc5eee24af3b84bc
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/run-child-process.js
@@ -0,0 +1,39 @@
+import { constants as osConstants } from 'os';
+import spawn from 'next/dist/compiled/cross-spawn';
+export function runChildProcess(command, args, options, onSpawn) {
+ const child = spawn(command, args, options);
+ return new Promise((resolve, reject)=>{
+ const onInterrupt = ()=>child.kill('SIGINT');
+ const onTerminate = ()=>child.kill('SIGTERM');
+ const onHangup = ()=>child.kill('SIGHUP');
+ process.on('SIGINT', onInterrupt);
+ process.on('SIGTERM', onTerminate);
+ process.on('SIGHUP', onHangup);
+ const cleanup = ()=>{
+ process.removeListener('SIGINT', onInterrupt);
+ process.removeListener('SIGTERM', onTerminate);
+ process.removeListener('SIGHUP', onHangup);
+ };
+ // Report delivery when the child starts, without waiting for the agent's work to finish.
+ if (onSpawn) {
+ child.once('spawn', ()=>{
+ try {
+ onSpawn();
+ } catch (error) {
+ cleanup();
+ reject(error);
+ }
+ });
+ }
+ child.once('error', (error)=>{
+ cleanup();
+ reject(error);
+ });
+ child.once('close', (code, signal)=>{
+ cleanup();
+ resolve(code ?? (signal ? 128 + (osConstants.signals[signal] ?? 1) : 1));
+ });
+ });
+}
+
+//# sourceMappingURL=run-child-process.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/upgrade/run-child-process.js.map b/e-commerce/node_modules/next/dist/esm/lib/upgrade/run-child-process.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..c5720ad253fb8078e3920eb304104f68dd12badb
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/upgrade/run-child-process.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/lib/upgrade/run-child-process.ts"],"sourcesContent":["import type { SpawnOptions } from 'child_process'\nimport { constants as osConstants } from 'os'\n\nimport spawn from 'next/dist/compiled/cross-spawn'\n\nexport function runChildProcess(\n command: string,\n args: string[],\n options: SpawnOptions,\n onSpawn: (() => void) | null\n): Promise {\n const child = spawn(command, args, options)\n\n return new Promise((resolve, reject) => {\n const onInterrupt = () => child.kill('SIGINT')\n const onTerminate = () => child.kill('SIGTERM')\n const onHangup = () => child.kill('SIGHUP')\n process.on('SIGINT', onInterrupt)\n process.on('SIGTERM', onTerminate)\n process.on('SIGHUP', onHangup)\n\n const cleanup = () => {\n process.removeListener('SIGINT', onInterrupt)\n process.removeListener('SIGTERM', onTerminate)\n process.removeListener('SIGHUP', onHangup)\n }\n\n // Report delivery when the child starts, without waiting for the agent's work to finish.\n if (onSpawn) {\n child.once('spawn', () => {\n try {\n onSpawn()\n } catch (error) {\n cleanup()\n reject(error)\n }\n })\n }\n\n child.once('error', (error: Error) => {\n cleanup()\n reject(error)\n })\n child.once(\n 'close',\n (code: number | null, signal: NodeJS.Signals | null) => {\n cleanup()\n resolve(code ?? (signal ? 128 + (osConstants.signals[signal] ?? 1) : 1))\n }\n )\n })\n}\n"],"names":["constants","osConstants","spawn","runChildProcess","command","args","options","onSpawn","child","Promise","resolve","reject","onInterrupt","kill","onTerminate","onHangup","process","on","cleanup","removeListener","once","error","code","signal","signals"],"mappings":"AACA,SAASA,aAAaC,WAAW,QAAQ,KAAI;AAE7C,OAAOC,WAAW,iCAAgC;AAElD,OAAO,SAASC,gBACdC,OAAe,EACfC,IAAc,EACdC,OAAqB,EACrBC,OAA4B;IAE5B,MAAMC,QAAQN,MAAME,SAASC,MAAMC;IAEnC,OAAO,IAAIG,QAAQ,CAACC,SAASC;QAC3B,MAAMC,cAAc,IAAMJ,MAAMK,IAAI,CAAC;QACrC,MAAMC,cAAc,IAAMN,MAAMK,IAAI,CAAC;QACrC,MAAME,WAAW,IAAMP,MAAMK,IAAI,CAAC;QAClCG,QAAQC,EAAE,CAAC,UAAUL;QACrBI,QAAQC,EAAE,CAAC,WAAWH;QACtBE,QAAQC,EAAE,CAAC,UAAUF;QAErB,MAAMG,UAAU;YACdF,QAAQG,cAAc,CAAC,UAAUP;YACjCI,QAAQG,cAAc,CAAC,WAAWL;YAClCE,QAAQG,cAAc,CAAC,UAAUJ;QACnC;QAEA,yFAAyF;QACzF,IAAIR,SAAS;YACXC,MAAMY,IAAI,CAAC,SAAS;gBAClB,IAAI;oBACFb;gBACF,EAAE,OAAOc,OAAO;oBACdH;oBACAP,OAAOU;gBACT;YACF;QACF;QAEAb,MAAMY,IAAI,CAAC,SAAS,CAACC;YACnBH;YACAP,OAAOU;QACT;QACAb,MAAMY,IAAI,CACR,SACA,CAACE,MAAqBC;YACpBL;YACAR,QAAQY,QAASC,CAAAA,SAAS,MAAOtB,CAAAA,YAAYuB,OAAO,CAACD,OAAO,IAAI,CAAA,IAAK,CAAA;QACvE;IAEJ;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/url.js b/e-commerce/node_modules/next/dist/esm/lib/url.js
new file mode 100644
index 0000000000000000000000000000000000000000..7c48a84ea7d9a5a0a6c6ca008be57966d675b3d4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/url.js
@@ -0,0 +1,45 @@
+import { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers';
+const DUMMY_ORIGIN = 'http://n';
+export function isFullStringUrl(url) {
+ return /https?:\/\//.test(url);
+}
+export function parseUrl(url) {
+ let parsed = undefined;
+ try {
+ parsed = new URL(url, DUMMY_ORIGIN);
+ } catch {}
+ return parsed;
+}
+export function parseReqUrl(url) {
+ const parsedUrl = parseUrl(url);
+ if (!parsedUrl) {
+ return;
+ }
+ const query = {};
+ for (const key of parsedUrl.searchParams.keys()){
+ const values = parsedUrl.searchParams.getAll(key);
+ query[key] = values.length > 1 ? values : values[0];
+ }
+ const legacyUrl = {
+ query,
+ hash: parsedUrl.hash,
+ search: parsedUrl.search,
+ path: parsedUrl.pathname,
+ pathname: parsedUrl.pathname,
+ href: `${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`,
+ host: '',
+ hostname: '',
+ auth: '',
+ protocol: '',
+ slashes: null,
+ port: ''
+ };
+ return legacyUrl;
+}
+export function stripNextRscUnionQuery(relativeUrl) {
+ const urlInstance = new URL(relativeUrl, DUMMY_ORIGIN);
+ urlInstance.searchParams.delete(NEXT_RSC_UNION_QUERY);
+ return urlInstance.pathname + urlInstance.search;
+}
+
+//# sourceMappingURL=url.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/url.js.map b/e-commerce/node_modules/next/dist/esm/lib/url.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..6fcd6118f6c1c5130edfa0ada66e8cf9464965a3
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/url.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/url.ts"],"sourcesContent":["import type { UrlWithParsedQuery } from 'url'\nimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\n\nconst DUMMY_ORIGIN = 'http://n'\n\nexport function isFullStringUrl(url: string) {\n return /https?:\\/\\//.test(url)\n}\n\nexport function parseUrl(url: string): URL | undefined {\n let parsed: URL | undefined = undefined\n try {\n parsed = new URL(url, DUMMY_ORIGIN)\n } catch {}\n return parsed\n}\n\nexport function parseReqUrl(url: string): UrlWithParsedQuery | undefined {\n const parsedUrl: URL | undefined = parseUrl(url)\n\n if (!parsedUrl) {\n return\n }\n\n const query: Record = {}\n\n for (const key of parsedUrl.searchParams.keys()) {\n const values = parsedUrl.searchParams.getAll(key)\n query[key] = values.length > 1 ? values : values[0]\n }\n\n const legacyUrl: UrlWithParsedQuery = {\n query,\n hash: parsedUrl.hash,\n search: parsedUrl.search,\n path: parsedUrl.pathname,\n pathname: parsedUrl.pathname,\n href: `${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`,\n host: '',\n hostname: '',\n auth: '',\n protocol: '',\n slashes: null,\n port: '',\n }\n return legacyUrl\n}\n\nexport function stripNextRscUnionQuery(relativeUrl: string): string {\n const urlInstance = new URL(relativeUrl, DUMMY_ORIGIN)\n urlInstance.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n return urlInstance.pathname + urlInstance.search\n}\n"],"names":["NEXT_RSC_UNION_QUERY","DUMMY_ORIGIN","isFullStringUrl","url","test","parseUrl","parsed","undefined","URL","parseReqUrl","parsedUrl","query","key","searchParams","keys","values","getAll","length","legacyUrl","hash","search","path","pathname","href","host","hostname","auth","protocol","slashes","port","stripNextRscUnionQuery","relativeUrl","urlInstance","delete"],"mappings":"AACA,SAASA,oBAAoB,QAAQ,0CAAyC;AAE9E,MAAMC,eAAe;AAErB,OAAO,SAASC,gBAAgBC,GAAW;IACzC,OAAO,cAAcC,IAAI,CAACD;AAC5B;AAEA,OAAO,SAASE,SAASF,GAAW;IAClC,IAAIG,SAA0BC;IAC9B,IAAI;QACFD,SAAS,IAAIE,IAAIL,KAAKF;IACxB,EAAE,OAAM,CAAC;IACT,OAAOK;AACT;AAEA,OAAO,SAASG,YAAYN,GAAW;IACrC,MAAMO,YAA6BL,SAASF;IAE5C,IAAI,CAACO,WAAW;QACd;IACF;IAEA,MAAMC,QAA2C,CAAC;IAElD,KAAK,MAAMC,OAAOF,UAAUG,YAAY,CAACC,IAAI,GAAI;QAC/C,MAAMC,SAASL,UAAUG,YAAY,CAACG,MAAM,CAACJ;QAC7CD,KAAK,CAACC,IAAI,GAAGG,OAAOE,MAAM,GAAG,IAAIF,SAASA,MAAM,CAAC,EAAE;IACrD;IAEA,MAAMG,YAAgC;QACpCP;QACAQ,MAAMT,UAAUS,IAAI;QACpBC,QAAQV,UAAUU,MAAM;QACxBC,MAAMX,UAAUY,QAAQ;QACxBA,UAAUZ,UAAUY,QAAQ;QAC5BC,MAAM,GAAGb,UAAUY,QAAQ,GAAGZ,UAAUU,MAAM,GAAGV,UAAUS,IAAI,EAAE;QACjEK,MAAM;QACNC,UAAU;QACVC,MAAM;QACNC,UAAU;QACVC,SAAS;QACTC,MAAM;IACR;IACA,OAAOX;AACT;AAEA,OAAO,SAASY,uBAAuBC,WAAmB;IACxD,MAAMC,cAAc,IAAIxB,IAAIuB,aAAa9B;IACzC+B,YAAYnB,YAAY,CAACoB,MAAM,CAACjC;IAEhC,OAAOgC,YAAYV,QAAQ,GAAGU,YAAYZ,MAAM;AAClD","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/verify-partytown-setup.js b/e-commerce/node_modules/next/dist/esm/lib/verify-partytown-setup.js
new file mode 100644
index 0000000000000000000000000000000000000000..a9ae4b00863034c1c25ad60da0467c182a3938b5
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/verify-partytown-setup.js
@@ -0,0 +1,44 @@
+import { promises } from 'fs';
+import { bold, cyan, red } from './picocolors';
+import path from 'path';
+import { hasNecessaryDependencies } from './has-necessary-dependencies';
+import { fileExists, FileType } from './file-exists';
+import * as Log from '../build/output/log';
+import { getPkgManager } from './helpers/get-pkg-manager';
+async function missingDependencyError(dir) {
+ const packageManager = getPkgManager(dir);
+ throw new Error(bold(red("It looks like you're trying to use Partytown with next/script but do not have the required package(s) installed.")) + '\n\n' + bold(`Please install Partytown by running:`) + '\n\n' + `\t${bold(cyan((packageManager === 'yarn' ? 'yarn add --dev' : packageManager === 'pnpm' ? 'pnpm install --save-dev' : 'npm install --save-dev') + ' @builder.io/partytown'))}` + '\n\n' + bold(`If you are not trying to use Partytown, please disable the experimental ${cyan('"nextScriptWorkers"')} flag in next.config.js.`) + '\n');
+}
+async function copyPartytownStaticFiles(deps, staticDir) {
+ const partytownLibDir = path.join(staticDir, '~partytown');
+ const hasPartytownLibDir = await fileExists(partytownLibDir, FileType.Directory);
+ if (hasPartytownLibDir) {
+ await promises.rm(partytownLibDir, {
+ recursive: true,
+ force: true
+ });
+ }
+ const { copyLibFiles } = await Promise.resolve(require(path.join(deps.resolved.get('@builder.io/partytown'), '../utils')));
+ await copyLibFiles(partytownLibDir);
+}
+export async function verifyPartytownSetup(dir, targetDir) {
+ var _partytownDeps_missing;
+ const partytownDeps = hasNecessaryDependencies(dir, [
+ {
+ file: '@builder.io/partytown',
+ pkg: '@builder.io/partytown',
+ exportsRestrict: false
+ }
+ ]);
+ if (((_partytownDeps_missing = partytownDeps.missing) == null ? void 0 : _partytownDeps_missing.length) > 0) {
+ await missingDependencyError(dir);
+ } else {
+ try {
+ await copyPartytownStaticFiles(partytownDeps, targetDir);
+ } catch (err) {
+ Log.warn(`Partytown library files could not be copied to the static directory. Please ensure that ${bold(cyan('@builder.io/partytown'))} is installed as a dependency.`);
+ }
+ }
+}
+
+//# sourceMappingURL=verify-partytown-setup.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/verify-partytown-setup.js.map b/e-commerce/node_modules/next/dist/esm/lib/verify-partytown-setup.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2448f618e850ee6bbc735977eeaf0bcf1de0fad3
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/verify-partytown-setup.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/verify-partytown-setup.ts"],"sourcesContent":["import { promises } from 'fs'\nimport { bold, cyan, red } from './picocolors'\n\nimport path from 'path'\nimport { hasNecessaryDependencies } from './has-necessary-dependencies'\nimport type { NecessaryDependencies } from './has-necessary-dependencies'\nimport { fileExists, FileType } from './file-exists'\nimport * as Log from '../build/output/log'\nimport { getPkgManager } from './helpers/get-pkg-manager'\n\nasync function missingDependencyError(dir: string) {\n const packageManager = getPkgManager(dir)\n\n throw new Error(\n bold(\n red(\n \"It looks like you're trying to use Partytown with next/script but do not have the required package(s) installed.\"\n )\n ) +\n '\\n\\n' +\n bold(`Please install Partytown by running:`) +\n '\\n\\n' +\n `\\t${bold(\n cyan(\n (packageManager === 'yarn'\n ? 'yarn add --dev'\n : packageManager === 'pnpm'\n ? 'pnpm install --save-dev'\n : 'npm install --save-dev') + ' @builder.io/partytown'\n )\n )}` +\n '\\n\\n' +\n bold(\n `If you are not trying to use Partytown, please disable the experimental ${cyan(\n '\"nextScriptWorkers\"'\n )} flag in next.config.js.`\n ) +\n '\\n'\n )\n}\n\nasync function copyPartytownStaticFiles(\n deps: NecessaryDependencies,\n staticDir: string\n) {\n const partytownLibDir = path.join(staticDir, '~partytown')\n const hasPartytownLibDir = await fileExists(\n partytownLibDir,\n FileType.Directory\n )\n\n if (hasPartytownLibDir) {\n await promises.rm(partytownLibDir, { recursive: true, force: true })\n }\n\n const { copyLibFiles } = await Promise.resolve(\n require(path.join(deps.resolved.get('@builder.io/partytown')!, '../utils'))\n )\n\n await copyLibFiles(partytownLibDir)\n}\n\nexport async function verifyPartytownSetup(\n dir: string,\n targetDir: string\n): Promise {\n const partytownDeps: NecessaryDependencies = hasNecessaryDependencies(dir, [\n {\n file: '@builder.io/partytown',\n pkg: '@builder.io/partytown',\n exportsRestrict: false,\n },\n ])\n\n if (partytownDeps.missing?.length > 0) {\n await missingDependencyError(dir)\n } else {\n try {\n await copyPartytownStaticFiles(partytownDeps, targetDir)\n } catch (err) {\n Log.warn(\n `Partytown library files could not be copied to the static directory. Please ensure that ${bold(\n cyan('@builder.io/partytown')\n )} is installed as a dependency.`\n )\n }\n }\n}\n"],"names":["promises","bold","cyan","red","path","hasNecessaryDependencies","fileExists","FileType","Log","getPkgManager","missingDependencyError","dir","packageManager","Error","copyPartytownStaticFiles","deps","staticDir","partytownLibDir","join","hasPartytownLibDir","Directory","rm","recursive","force","copyLibFiles","Promise","resolve","require","resolved","get","verifyPartytownSetup","targetDir","partytownDeps","file","pkg","exportsRestrict","missing","length","err","warn"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,KAAI;AAC7B,SAASC,IAAI,EAAEC,IAAI,EAAEC,GAAG,QAAQ,e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AeD;QAChD,EAAE,OAAOO,KAAK;YACZ9B,IAAI+B,IAAI,CACN,CAAC,wFAAwF,EAAEtC,KACzFC,KAAK,0BACL,8BAA8B,CAAC;QAErC;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/verify-root-layout.js b/e-commerce/node_modules/next/dist/esm/lib/verify-root-layout.js
new file mode 100644
index 0000000000000000000000000000000000000000..ed200dce6adef4a8bf3078e66096d4e5ca01ce03
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/verify-root-layout.js
@@ -0,0 +1,109 @@
+import path from 'path';
+import * as Log from '../build/output/log';
+import { promises as fs } from 'fs';
+import { bold } from './picocolors';
+import { APP_DIR_ALIAS } from './constants';
+const globOrig = require('next/dist/compiled/glob');
+const glob = (cwd, pattern)=>{
+ return new Promise((resolve, reject)=>{
+ globOrig(pattern, {
+ cwd
+ }, (err, files)=>{
+ if (err) {
+ return reject(err);
+ }
+ resolve(files);
+ });
+ });
+};
+function getRootLayout(isTs) {
+ if (isTs) {
+ return `export const metadata = {
+ title: 'Next.js',
+ description: 'Generated by Next.js',
+}
+
+export default function RootLayout({
+ children,
+}: {
+ children: React.ReactNode
+}) {
+ return (
+
+ {children}
+
+ )
+}
+`;
+ }
+ return `export const metadata = {
+ title: 'Next.js',
+ description: 'Generated by Next.js',
+}
+
+export default function RootLayout({ children }) {
+ return (
+
+ {children}
+
+ )
+}
+`;
+}
+export async function verifyRootLayout({ dir, appDir, tsconfigPath, pagePath, pageExtensions }) {
+ let rootLayoutPath;
+ try {
+ const layoutFiles = await glob(appDir, `**/layout.{${pageExtensions.join(',')}}`);
+ const isFileUnderAppDir = pagePath.startsWith(`${APP_DIR_ALIAS}/`);
+ const normalizedPagePath = pagePath.replace(`${APP_DIR_ALIAS}/`, '');
+ const pagePathSegments = normalizedPagePath.split('/');
+ // Find an available dir to place the layout file in, the layout file can't affect any other layout.
+ // Place the layout as close to app/ as possible.
+ let availableDir;
+ if (isFileUnderAppDir) {
+ if (layoutFiles.length === 0) {
+ // If there's no other layout file we can place the layout file in the app dir.
+ // However, if the page is within a route group directly under app (e.g. app/(routegroup)/page.js)
+ // prefer creating the root layout in that route group.
+ const firstSegmentValue = pagePathSegments[0];
+ availableDir = firstSegmentValue.startsWith('(') ? firstSegmentValue : '';
+ } else {
+ pagePathSegments.pop() // remove the page from segments
+ ;
+ let currentSegments = [];
+ for (const segment of pagePathSegments){
+ currentSegments.push(segment);
+ // Find the dir closest to app/ where a layout can be created without affecting other layouts.
+ if (!layoutFiles.some((file)=>file.startsWith(currentSegments.join('/')))) {
+ availableDir = currentSegments.join('/');
+ break;
+ }
+ }
+ }
+ } else {
+ availableDir = '';
+ }
+ if (typeof availableDir === 'string') {
+ const tsConfigFileName = tsconfigPath || 'tsconfig.json';
+ const resolvedTsConfigPath = path.join(dir, tsConfigFileName);
+ const hasTsConfig = await fs.access(resolvedTsConfigPath).then(()=>true, ()=>false);
+ rootLayoutPath = path.join(appDir, availableDir, `layout.${hasTsConfig ? 'tsx' : 'js'}`);
+ await fs.writeFile(rootLayoutPath, getRootLayout(hasTsConfig));
+ Log.warn(`Your page ${bold(`app/${normalizedPagePath}`)} did not have a root layout. We created ${bold(`app${rootLayoutPath.replace(appDir, '')}`)} for you.`);
+ // Created root layout
+ return [
+ true,
+ rootLayoutPath
+ ];
+ }
+ } catch (e) {
+ console.error(e);
+ }
+ // Didn't create root layout
+ return [
+ false,
+ rootLayoutPath
+ ];
+}
+
+//# sourceMappingURL=verify-root-layout.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/verify-root-layout.js.map b/e-commerce/node_modules/next/dist/esm/lib/verify-root-layout.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..8fb7fab259994edaf028123c5bba1575c2f338a4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/verify-root-layout.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/verify-root-layout.ts"],"sourcesContent":["import path from 'path'\nimport * as Log from '../build/output/log'\nimport { promises as fs } from 'fs'\nimport { bold } from './picocolors'\nimport { APP_DIR_ALIAS } from './constants'\nimport type { PageExtensions } from '../build/page-extensions-type'\n\nconst globOrig =\n require('next/dist/compiled/glob') as typeof import('next/dist/compiled/glob')\nconst glob = (cwd: string, pattern: string): Promise => {\n return new Promise((resolve, reject) => {\n globOrig(pattern, { cwd }, (err, files) => {\n if (err) {\n return reject(err)\n }\n resolve(files)\n })\n })\n}\n\nfunction getRootLayout(isTs: boolean) {\n if (isTs) {\n return `export const metadata = {\n title: 'Next.js',\n description: 'Generated by Next.js',\n}\n\nexport default function RootLayout({\n children,\n}: {\n children: React.ReactNode\n}) {\n return (\n \n {children}\n \n )\n}\n`\n }\n\n return `export const metadata = {\n title: 'Next.js',\n description: 'Generated by Next.js',\n}\n\nexport default function RootLayout({ children }) {\n return (\n \n {children}\n \n )\n}\n`\n}\n\nexport async function verifyRootLayout({\n dir,\n appDir,\n tsconfigPath,\n pagePath,\n pageExtensions,\n}: {\n dir: string\n appDir: string\n tsconfigPath: string | undefined\n pagePath: string\n pageExtensions: PageExtensions\n}): Promise<[boolean, string | undefined]> {\n let rootLayoutPath: string | undefined\n try {\n const layoutFiles = await glob(\n appDir,\n `**/layout.{${pageExtensions.join(',')}}`\n )\n const isFileUnderAppDir = pagePath.startsWith(`${APP_DIR_ALIAS}/`)\n const normalizedPagePath = pagePath.replace(`${APP_DIR_ALIAS}/`, '')\n const pagePathSegments = normalizedPagePath.split('/')\n\n // Find an available dir to place the layout file in, the layout file can't affect any other layout.\n // Place the layout as close to app/ as possible.\n let availableDir: string | undefined\n\n if (isFileUnderAppDir) {\n if (layoutFiles.length === 0) {\n // If there's no other layout file we can place the layout file in the app dir.\n // However, if the page is within a route group directly under app (e.g. app/(routegroup)/page.js)\n // prefer creating the root layout in that route group.\n const firstSegmentValue = pagePathSegments[0]\n availableDir = firstSegmentValue.startsWith('(')\n ? firstSegmentValue\n : ''\n } else {\n pagePathSegments.pop() // remove the page from segments\n\n let currentSegments: string[] = []\n for (const segment of pagePathSegments) {\n currentSegments.push(segment)\n // Find the dir closest to app/ where a layout can be created without affecting other layouts.\n if (\n !layoutFiles.some((file) =>\n file.startsWith(currentSegments.join('/'))\n )\n ) {\n availableDir = currentSegments.join('/')\n break\n }\n }\n }\n } else {\n availableDir = ''\n }\n\n if (typeof availableDir === 'string') {\n const tsConfigFileName = tsconfigPath || 'tsconfig.json'\n const resolvedTsConfigPath = path.join(dir, tsConfigFileName)\n const hasTsConfig = await fs.access(resolvedTsConfigPath).then(\n () => true,\n () => false\n )\n\n rootLayoutPath = path.join(\n appDir,\n availableDir,\n `layout.${hasTsConfig ? 'tsx' : 'js'}`\n )\n await fs.writeFile(rootLayoutPath, getRootLayout(hasTsConfig))\n\n Log.warn(\n `Your page ${bold(\n `app/${normalizedPagePath}`\n )} did not have a root layout. We created ${bold(\n `app${rootLayoutPath.replace(appDir, '')}`\n )} for you.`\n )\n\n // Created root layout\n return [true, rootLayoutPath]\n }\n } catch (e) {\n console.error(e)\n }\n\n // Didn't create root layout\n return [false, rootLayoutPath]\n}\n"],"names":["path","Log","promises","fs","bold","APP_DIR_ALIAS","globOrig","require","glob","cwd","pattern","Promise","resolve","reject","err","files","getRootLayout","isTs","verifyRootLayout","dir","appDir","tsconfigPath","pagePath","pageExtensions","rootLayoutPath","layoutFiles","join","isFileUnderAppDir","startsWith","normalizedPagePath","replace","pagePathSegments","split","availableDir","length","firstSegmentValue","pop","currentSegments","segment","push","some","file","tsConfigFileName","resolvedTsConfigPath","hasTsConfig","access","then","writeFile","warn","e","console","error"],"mappings":"AAAA,OAAOA,UAAU,OAAM;AACvB,YAAYC,SAAS,sBAAqB;AAC1C,SAASC,YAAYC,EAAE,QAAQ,KAAI;AACnC,SAASC,IAAI,QAAQ,eAAc;AACnC,SAASC,aAAa,QAAQ,cAAa;AAG3C,MAAMC,WACJC,QAAQ;AACV,MAAMC,OAAO,CAACC,KAAa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BACAO,eAAeI,gBAAgBX,IAAI,CAAC;wBACpC;oBACF;gBACF;YACF;QACF,OAAO;YACLO,eAAe;QACjB;QAEA,IAAI,OAAOA,iBAAiB,UAAU;YACpC,MAAMS,mBAAmBrB,gBAAgB;YACzC,MAAMsB,uBAAuB3C,KAAK0B,IAAI,CAACP,KAAKuB;YAC5C,MAAME,cAAc,MAAMzC,GAAG0C,MAAM,CAACF,sBAAsBG,IAAI,CAC5D,IAAM,MACN,IAAM;YAGRtB,iBAAiBxB,KAAK0B,IAAI,CACxBN,QACAa,cACA,CAAC,OAAO,EAAEW,cAAc,QAAQ,MAAM;YAExC,MAAMzC,GAAG4C,SAAS,CAACvB,gBAAgBR,cAAc4B;YAEjD3C,IAAI+C,IAAI,CACN,CAAC,UAAU,EAAE5C,KACX,CAAC,IAAI,EAAEyB,oBAAoB,EAC3B,wCAAwC,EAAEzB,KAC1C,CAAC,GAAG,EAAEoB,eAAeM,OAAO,CAACV,QAAQ,KAAK,EAC1C,SAAS,CAAC;YAGd,sBAAsB;YACtB,OAAO;gBAAC;gBAAMI;aAAe;QAC/B;IACF,EAAE,OAAOyB,GAAG;QACVC,QAAQC,KAAK,CAACF;IAChB;IAEA,4BAA4B;IAC5B,OAAO;QAAC;QAAOzB;KAAe;AAChC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/verify-typescript-setup.js b/e-commerce/node_modules/next/dist/esm/lib/verify-typescript-setup.js
new file mode 100644
index 0000000000000000000000000000000000000000..197ea95fdab0d00beb32afcc34f98fe0c9f8e49d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/verify-typescript-setup.js
@@ -0,0 +1,209 @@
+import { bold, cyan, red, yellow } from './picocolors';
+import path from 'path';
+import { hasNecessaryDependencies } from './has-necessary-dependencies';
+import semver from 'next/dist/compiled/semver';
+import { CompileError } from './compile-error';
+import * as log from '../build/output/log';
+import { getTypeScriptIntent } from './typescript/getTypeScriptIntent';
+import { writeAppTypeDeclarations } from './typescript/writeAppTypeDeclarations';
+import { writeConfigurationDefaults } from './typescript/writeConfigurationDefaults';
+import { installDependencies } from './install-dependencies';
+import { isCI } from '../server/ci-info';
+import { missingDepsError } from './typescript/missingDependencyError';
+import { getTypeScriptApiMissingError, getTypeScriptPackageInfo, hasNativeTypeScriptPreview } from './typescript/runTypeScriptCli';
+const typescriptApiPackage = {
+ file: 'typescript/lib/typescript.js',
+ pkg: 'typescript',
+ install: 'typescript@^6.0.0',
+ exportsRestrict: true
+};
+const typescriptCliPackage = {
+ // The CLI path is resolved from the package's bin metadata after this initial
+ // package-presence check, since aliased TypeScript packages may rename it.
+ file: 'typescript/package.json',
+ pkg: 'typescript',
+ exportsRestrict: true
+};
+const requiredTypePackages = [
+ {
+ file: '@types/react/index.d.ts',
+ pkg: '@types/react',
+ exportsRestrict: true
+ },
+ {
+ file: '@types/node/index.d.ts',
+ pkg: '@types/node',
+ exportsRestrict: true
+ }
+];
+export async function verifyAndRunTypeScript({ dir, distDir, cacheDir, strictRouteTypes, tsconfigPath, shouldRunTypeCheck, typedRoutes, disableStaticImages, hasAppDir, hasPagesDir, appDir, pagesDir, debugBuildPaths, useTypeScriptCli = false, onFirstCliOutput }) {
+ const tsConfigFileName = tsconfigPath || 'tsconfig.json';
+ const resolvedTsConfigPath = path.join(dir, tsConfigFileName);
+ const typeCheckMode = useTypeScriptCli ? 'typescript-cli' : 'typescript-api';
+ // Construct intentDirs from appDir and pagesDir for getTypeScriptIntent
+ const intentDirs = [
+ pagesDir,
+ appDir
+ ].filter(Boolean);
+ try {
+ var _deps_missing, _deps_missing1;
+ // Check if the project uses TypeScript:
+ const intent = await getTypeScriptIntent(dir, intentDirs, tsConfigFileName);
+ if (!intent) {
+ return {
+ version: null,
+ typeCheckMode
+ };
+ }
+ // Check if @typescript/native-preview is installed as an alternative
+ const hasNativePreview = hasNativeTypeScriptPreview(dir);
+ const installedTypeScript = getTypeScriptPackageInfo(dir);
+ if (!useTypeScriptCli && !hasNativePreview && installedTypeScript && !installedTypeScript.apiPath) {
+ throw getTypeScriptApiMissingError(installedTypeScript.version);
+ }
+ const requiredPackages = [
+ useTypeScriptCli ? typescriptCliPackage : typescriptApiPackage,
+ ...requiredTypePackages
+ ];
+ // Ensure TypeScript and necessary `@types/*` are installed:
+ let deps = hasNecessaryDependencies(dir, requiredPackages);
+ // If @typescript/native-preview is installed and only the typescript package is missing,
+ // we can skip auto-installing typescript since the native preview provides TS compilation.
+ // However, we still need @types/react and @types/node for type checking.
+ if (!useTypeScriptCli && hasNativePreview && ((_deps_missing = deps.missing) == null ? void 0 : _deps_missing.length) > 0) {
+ const missingWithoutTypescript = deps.missing.filter((dep)=>dep.pkg !== 'typescript');
+ const onlyTypescriptMissing = deps.missing.length === 1 && deps.missing[0].pkg === 'typescript';
+ if (onlyTypescriptMissing) {
+ // @typescript/native-preview is installed and only typescript is missing
+ // Skip installation and return early - the project can use the native preview
+ log.info(`Detected ${bold('@typescript/native-preview')} as TypeScript compiler. ` + `Some Next.js TypeScript features (like type checking during build) require the standard ${bold('typescript')} package.`);
+ // Still write type declarations since they don't require the typescript package
+ await writeAppTypeDeclarations({
+ baseDir: dir,
+ distDir,
+ imageImportsEnabled: !disableStaticImages,
+ hasPagesDir,
+ hasAppDir,
+ strictRouteTypes,
+ typedRoutes
+ });
+ return {
+ version: null,
+ typeCheckMode
+ };
+ }
+ // If there are other missing deps besides typescript, only install those
+ if (missingWithoutTypescript.length > 0 && missingWithoutTypescript.length < deps.missing.length) {
+ deps.missing = missingWithoutTypescript;
+ }
+ }
+ if (((_deps_missing1 = deps.missing) == null ? void 0 : _deps_missing1.length) > 0) {
+ if (isCI) {
+ // we don't attempt auto install in CI to avoid side-effects
+ // and instead log the error for installing needed packages
+ missingDepsError(dir, deps.missing);
+ }
+ console.log(bold(yellow(`It looks like you're trying to use TypeScript but do not have the required package(s) installed.`)) + '\n' + 'Installing dependencies' + '\n\n' + bold('If you are not trying to use TypeScript, please remove the ' + cyan('tsconfig.json') + ' file from your package root (and any TypeScript files in your app and pages directories).') + '\n');
+ await installDependencies(dir, deps.missing, true).catch((err)=>{
+ if (err && typeof err === 'object' && 'command' in err) {
+ console.error(`Failed to install required TypeScript dependencies, please install them manually to continue:\n` + err.command + '\n');
+ }
+ throw err;
+ });
+ deps = hasNecessaryDependencies(dir, requiredPackages);
+ }
+ const typeScriptPackage = getTypeScriptPackageInfo(dir);
+ const typeScriptPath = useTypeScriptCli ? typeScriptPackage == null ? void 0 : typeScriptPackage.tscPath : typeScriptPackage == null ? void 0 : typeScriptPackage.apiPath;
+ if (!typeScriptPackage || !typeScriptPath) {
+ missingDepsError(dir, deps.missing.length > 0 ? deps.missing : [
+ useTypeScriptCli ? typescriptCliPackage : typescriptApiPackage
+ ]);
+ }
+ const typescriptVersion = typeScriptPackage.version;
+ if (semver.lt(typescriptVersion, '5.1.0')) {
+ log.warn(`Minimum recommended TypeScript version is v5.1.0, older versions can potentially be incompatible with Next.js. Detected: ${typescriptVersion}`);
+ }
+ // Reconfigure (or create) the user's `tsconfig.json` for them:
+ await writeConfigurationDefaults(typescriptVersion, resolvedTsConfigPath, intent.firstTimeSetup, hasAppDir, distDir, hasPagesDir, strictRouteTypes);
+ // Write out the necessary `next-env.d.ts` file to correctly register
+ // Next.js' types:
+ await writeAppTypeDeclarations({
+ baseDir: dir,
+ distDir,
+ imageImportsEnabled: !disableStaticImages,
+ hasPagesDir,
+ hasAppDir,
+ strictRouteTypes,
+ typedRoutes
+ });
+ let result;
+ if (shouldRunTypeCheck) {
+ if (useTypeScriptCli) {
+ if (debugBuildPaths) {
+ log.warn('`experimental.useTypeScriptCli` checks the complete TypeScript project; `--debug-build-paths` does not limit type checking.');
+ }
+ const { runTypeCheckCli } = require('./typescript/runTypeCheckCli');
+ result = await runTypeCheckCli({
+ baseDir: dir,
+ tsConfigPath: resolvedTsConfigPath,
+ tscPath: typeScriptPath,
+ cacheDir,
+ onFirstOutput: onFirstCliOutput
+ });
+ } else {
+ const { runTypeCheck } = require('./typescript/runTypeCheck');
+ // Install native bindings so that code frame rendering works in the worker
+ const { installBindings } = require('../build/swc/install-bindings');
+ await installBindings();
+ const typescript = await Promise.resolve(require(typeScriptPath));
+ // Verify the project passes type-checking before we go to webpack phase:
+ result = await runTypeCheck(typescript, dir, distDir, resolvedTsConfigPath, cacheDir, hasAppDir, {
+ app: appDir,
+ pages: pagesDir
+ }, debugBuildPaths);
+ }
+ }
+ return {
+ result,
+ version: typescriptVersion,
+ typeCheckMode
+ };
+ } catch (err) {
+ // Print the user-facing message here and rethrow. This function runs both
+ // in-process (next dev / next test / next typegen, and the CLI type-check
+ // during build) and inside a jest worker (the TypeScript-API type-check
+ // during build). A thrown error does not survive the worker boundary — the
+ // parent only sees `Call retries were exceeded` — so the message must be
+ // printed on this side. The caller decides what to do with the throw (exit,
+ // or tolerate it as `next dev` does on re-verification).
+ if (err instanceof CompileError) {
+ // The checker already printed its diagnostics.
+ console.error(red('Failed to type check.\n'));
+ if (err.message) {
+ console.error(err.message);
+ }
+ } else if (err instanceof Error) {
+ console.error(err.message);
+ } else {
+ console.error(err);
+ }
+ throw err;
+ }
+}
+/**
+ * Worker entrypoint used by `next build` for the TypeScript-API type-check.
+ * `verifyAndRunTypeScript` has already printed any error, so on failure we exit
+ * the worker directly rather than rethrowing: a thrown error would be retried by
+ * jest-worker and surface in the parent as the unhelpful
+ * `Jest worker encountered 1 child process exceptions, exceeding retry limit`.
+ */ export async function verifyAndRunTypeScriptInWorker(options) {
+ try {
+ return await verifyAndRunTypeScript(options);
+ } catch {
+ // The error was already printed by `verifyAndRunTypeScript`.
+ // Kill the worker with a non-zero exit code.
+ process.exit(1);
+ }
+}
+
+//# sourceMappingURL=verify-typescript-setup.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/verify-typescript-setup.js.map b/e-commerce/node_modules/next/dist/esm/lib/verify-typescript-setup.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..40446104150e8eea2916d10da2c40bce3f2d600f
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/verify-typescript-setup.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/verify-typescript-setup.ts"],"sourcesContent":["import { bold, cyan, red, yellow } from './picocolors'\nimport path from 'path'\n\nimport { hasNecessaryDependencies } from './has-necessary-dependencies'\nimport type {\n MissingDependency,\n NecessaryDependencies,\n} from './has-necessary-dependencies'\nimport semver from 'next/dist/compiled/semver'\nimport { CompileError } from './compile-error'\nimport * as log from '../build/output/log'\n\nimport { getTypeScriptIntent } from './typescript/getTypeScriptIntent'\nimport type { TypeCheckResult } from './typescript/runTypeCheck'\nimport { writeAppTypeDeclarations } from './typescript/writeAppTypeDeclarations'\nimport { writeConfigurationDefaults } from './typescript/writeConfigurationDefaults'\nimport { installDependencies } from './install-dependencies'\nimport { isCI } from '../server/ci-info'\nimport { missingDepsError } from './typescript/missingDependencyError'\nimport {\n getTypeScriptApiMissingError,\n getTypeScriptPackageInfo,\n hasNativeTypeScriptPreview,\n} from './typescript/runTypeScriptCli'\n\nconst typescriptApiPackage: MissingDependency = {\n file: 'typescript/lib/typescript.js',\n pkg: 'typescript',\n install: 'typescript@^6.0.0',\n exportsRestrict: true,\n}\n\nconst typescriptCliPackage: MissingDependency = {\n // The CLI path is resolved from the package's bin metadata after this initial\n // package-presence check, since aliased TypeScript packages may rename it.\n file: 'typescript/package.json',\n pkg: 'typescript',\n exportsRestrict: true,\n}\n\nconst requiredTypePackages: MissingDependency[] = [\n {\n file: '@types/react/index.d.ts',\n pkg: '@types/react',\n exportsRestrict: true,\n },\n {\n file: '@types/node/index.d.ts',\n pkg: '@types/node',\n exportsRestrict: true,\n },\n]\n\nexport async function verifyAndRunTypeScript({\n dir,\n distDir,\n cacheDir,\n strictRouteTypes,\n tsconfigPath,\n shouldRunTypeCheck,\n typedRoutes,\n disableStaticImages,\n hasAppDir,\n hasPagesDir,\n appDir,\n pagesDir,\n debugBuildPaths,\n useTypeScriptCli = false,\n onFirstCliOutput,\n}: {\n dir: string\n distDir: string\n cacheDir?: string\n strictRouteTypes: boolean\n tsconfigPath: string | undefined\n shouldRunTypeCheck: boolean\n typedRoutes: boolean\n disableStaticImages: boolean\n hasAppDir: boolean\n hasPagesDir: boolean\n appDir?: string\n pagesDir?: string\n debugBuildPaths?: { app?: string[]; pages?: string[] }\n useTypeScriptCli?: boolean\n /**\n * Called once when the CLI checker first produces output, so the caller can\n * stop the build spinner. Only used on the in-process CLI path.\n */\n onFirstCliOutput?: () => void\n}): Promise<{\n result?: TypeCheckResult\n version: string | null\n typeCheckMode: 'typescript-api' | 'typescript-cli'\n}> {\n const tsConfigFileName = tsconfigPath || 'tsconfig.json'\n const resolvedTsConfigPath = path.join(dir, tsConfigFileName)\n const typeCheckMode = useTypeScriptCli ? 'typescript-cli' : 'typescript-api'\n\n // Construct intentDirs from appDir and pagesDir for getTypeScriptIntent\n const intentDirs = [pagesDir, appDir].filter(Boolean) as string[]\n\n try {\n // Check if the project uses TypeScript:\n const intent = await getTypeScriptIntent(dir, intentDirs, tsConfigFileName)\n if (!intent) {\n return { version: null, typeCheckMode }\n }\n\n // Check if @typescript/native-preview is installed as an alternative\n const hasNativePreview = hasNativeTypeScriptPreview(dir)\n const installedTypeScript = getTypeScriptPackageInfo(dir)\n\n if (\n !useTypeScriptCli &&\n !hasNativePreview &&\n installedTypeScript &&\n !installedTypeScript.apiPath\n ) {\n throw getTypeScriptApiMissingError(installedTypeScript.version)\n }\n\n const requiredPackages: MissingDependency[] = [\n useTypeScriptCli ? typescriptCliPackage : typescriptApiPackage,\n ...requiredTypePackages,\n ]\n\n // Ensure TypeScript and necessary `@types/*` are installed:\n let deps: NecessaryDependencies = hasNecessaryDependencies(\n dir,\n requiredPackages\n )\n\n // If @typescript/native-preview is installed and only the typescript package is missing,\n // we can skip auto-installing typescript since the native preview provides TS compilation.\n // However, we still need @types/react and @types/node for type checking.\n if (!useTypeScriptCli && hasNativePreview && deps.missing?.length > 0) {\n const missingWithoutTypescript = deps.missing.filter(\n (dep) => dep.pkg !== 'typescript'\n )\n const onlyTypescriptMissing =\n deps.missing.length === 1 && deps.missing[0].pkg === 'typescript'\n\n if (onlyTypescriptMissing) {\n // @typescript/native-preview is installed and only typescript is missing\n // Skip installation and return early - the project can use the native preview\n log.info(\n `Detected ${bold('@typescript/native-preview')} as TypeScript compiler. ` +\n `Some Next.js TypeScript features (like type checking during build) require the standard ${bold('typescript')} package.`\n )\n\n // Still write type declarations since they don't require the typescript package\n await writeAppTypeDeclarations({\n baseDir: dir,\n distDir,\n imageImportsEnabled: !disableStaticImages,\n hasPagesDir,\n hasAppDir,\n strictRouteTypes,\n typedRoutes,\n })\n\n return { version: null, typeCheckMode }\n }\n\n // If there are other missing deps besides typescript, only install those\n if (\n missingWithoutTypescript.length > 0 &&\n missingWithoutTypescript.length < deps.missing.length\n ) {\n deps.missing = missingWithoutTypescript\n }\n }\n\n if (deps.missing?.length > 0) {\n if (isCI) {\n // we don't attempt auto install in CI to avoid side-effects\n // and instead log the error for installing needed packages\n missingDepsError(dir, deps.missing)\n }\n console.log(\n bold(\n yellow(\n `It looks like you're trying to use TypeScript but do not have the required package(s) installed.`\n )\n ) +\n '\\n' +\n 'Installing dependencies' +\n '\\n\\n' +\n bold(\n 'If you are not trying to use TypeScript, please remove the ' +\n cyan('tsconfig.json') +\n ' file from your package root (and any TypeScript files in your app and pages directories).'\n ) +\n '\\n'\n )\n await installDependencies(dir, deps.missing, true).catch((err) => {\n if (err && typeof err === 'object' && 'command' in err) {\n console.error(\n `Failed to install required TypeScript dependencies, please install them manually to continue:\\n` +\n (err as any).command +\n '\\n'\n )\n }\n throw err\n })\n deps = hasNecessaryDependencies(dir, requiredPackages)\n }\n\n const typeScriptPackage = getTypeScriptPackageInfo(dir)\n const typeScriptPath = useTypeScriptCli\n ? typeScriptPackage?.tscPath\n : typeScriptPackage?.apiPath\n\n if (!typeScriptPackage || !typeScriptPath) {\n missingDepsError(\n dir,\n deps.missing.length > 0\n ? deps.missing\n : [useTypeScriptCli ? typescriptCliPackage : typescriptApiPackage]\n )\n }\n\n const typescriptVersion = typeScriptPackage.version\n\n if (semver.lt(typescriptVersion, '5.1.0')) {\n log.warn(\n `Minimum recommended TypeScript version is v5.1.0, older versions can potentially be incompatible with Next.js. Detected: ${typescriptVersion}`\n )\n }\n\n // Reconfigure (or create) the user's `tsconfig.json` for them:\n await writeConfigurationDefaults(\n typescriptVersion,\n resolvedTsConfigPath,\n intent.firstTimeSetup,\n hasAppDir,\n distDir,\n hasPagesDir,\n strictRouteTypes\n )\n // Write out the necessary `next-env.d.ts` file to correctly register\n // Next.js' types:\n await writeAppTypeDeclarations({\n baseDir: dir,\n distDir,\n imageImportsEnabled: !disableStaticImages,\n hasPagesDir,\n hasAppDir,\n strictRouteTypes,\n typedRoutes,\n })\n\n let result\n if (shouldRunTypeCheck) {\n if (useTypeScriptCli) {\n if (debugBuildPaths) {\n log.warn(\n '`experimental.useTypeScriptCli` checks the complete TypeScript project; `--debug-build-paths` does not limit type checking.'\n )\n }\n\n const { runTypeCheckCli } =\n require('./typescript/runTypeCheckCli') as typeof import('./typescript/runTypeCheckCli')\n result = await runTypeCheckCli({\n baseDir: dir,\n tsConfigPath: resolvedTsConfigPath,\n tscPath: typeScriptPath,\n cacheDir,\n onFirstOutput: onFirstCliOutput,\n })\n } else {\n const { runTypeCheck } =\n require('./typescript/runTypeCheck') as typeof import('./typescript/runTypeCheck')\n // Install native bindings so that code frame rendering works in the worker\n const { installBindings } =\n require('../build/swc/install-bindings') as typeof import('../build/swc/install-bindings')\n await installBindings()\n\n const typescript = (await Promise.resolve(\n require(typeScriptPath)\n )) as typeof import('typescript')\n\n // Verify the project passes type-checking before we go to webpack phase:\n result = await runTypeCheck(\n typescript,\n dir,\n distDir,\n resolvedTsConfigPath,\n cacheDir,\n hasAppDir,\n { app: appDir, pages: pagesDir },\n debugBuildPaths\n )\n }\n }\n return { result, version: typescriptVersion, typeCheckMode }\n } catch (err) {\n // Print the user-facing message here and rethrow. This function runs both\n // in-process (next dev / next test / next typegen, and the CLI type-check\n // during build) and inside a jest worker (the TypeScript-API type-check\n // during build). A thrown error does not survive the worker boundary — the\n // parent only sees `Call retries were exceeded` — so the message must be\n // printed on this side. The caller decides what to do with the throw (exit,\n // or tolerate it as `next dev` does on re-verification).\n if (err instanceof CompileError) {\n // The checker already printed its diagnostics.\n console.error(red('Failed to type check.\\n'))\n if (err.message) {\n console.error(err.message)\n }\n } else if (err instanceof Error) {\n console.error(err.message)\n } else {\n console.error(err)\n }\n throw err\n }\n}\n\n/**\n * Worker entrypoint used by `next build` for the TypeScript-API type-check.\n * `verifyAndRunTypeScript` has already printed any error, so on failure we exit\n * the worker directly rather than rethrowing: a thrown error would be retried by\n * jest-worker and surface in the parent as the unhelpful\n * `Jest worker encountered 1 child process exceptions, exceeding retry limit`.\n */\nexport async function verifyAndRunTypeScriptInWorker(\n options: Parameters[0]\n): ReturnType {\n try {\n return await verifyAndRunTypeScript(options)\n } catch {\n // The error was already printed by `verifyAndRunTypeScript`.\n // Kill the worker with a non-zero exit code.\n process.exit(1)\n }\n}\n"],"names":["bold","cyan","red","yellow","path","hasNecessaryDependencies","semver","CompileError","log","getTypeScriptIntent","writeAppTypeDeclarations","writeConfigurationDefaults","installDependencies","isCI","missingDepsError","getTypeScriptApiMissingError","getTypeScriptPackageInfo","hasNativeTypeScriptPreview","typescriptApiPackage","file","pkg","install","exportsRestrict","typescriptCliPackage","requiredTypePackages","verifyAndRunTypeScript","dir","distDir","cacheDir","strictRouteTypes","tsconfigPath","shouldRunTypeCheck","typedRoutes","disableStaticImages","hasAppDir","hasPagesDir","appDir","pagesDir","debugBuildPaths","useTypeScriptCli","onFirstCliOutput","tsConfigFileName","resolvedTsConfigPath","join","typeCheckMode","intentDirs","filter","Boolean","deps","intent","version","hasNativePreview","installedTypeScript","apiPath","requiredPackages","missing","length","missingWithoutTypescript","dep","onlyTypescriptMissing","info","baseDir","imageImportsEnabled","console","catch","err","error","command","typeScriptPackage","typeScriptPath","tscPath","typescriptVersion","lt","warn","firstTimeSetup","result","runTypeCheckCli","require","tsConfigPath","onFirstOutput","runTypeCheck","installBindings","typescript","Promise","resolve","app","pages","message","Error","verifyAndRunTypeScriptInWorker","options","process","exit"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,GAAG,EAAEC,MAAM,QAAQ,eAAc;AACtD,OAAOC,UAAU,OAAM;AAEvB,SAASC,wBAAwB,QAAQ,+BAA8B;AAKvE,OAAOC,YAAY,4BAA2B;AAC9C,SAASC,YAAY,QAAQ,kBAAiB;AAC9C,YAAYC,SAAS,sBAAqB;AAE1C,SAASC,mBAAmB,QAAQ,mCAAkC;AAEtE,SAASC,wBAAwB,QAAQ,wCAAuC;AAChF,SAASC,0BAA0B,QAAQ,0CAAyC;AACpF,SAASC,mBAAmB,QAAQ,yBAAwB;AAC5D,SAASC,IAAI,QAAQ,oBAAmB;AACxC,SAASC,gBAAgB,QAAQ,sCAAqC;AACtE,SACEC,4BAA4B,EAC5BC,wBAAwB,EACxBC,0BAA0B,QACrB,gCAA+B;AAEtC,MAAMC,uBAA0C;IAC9CC,MAAM;IACNC,KAAK;IACLC,SAAS;IACTC,iBAAiB;AACnB;AAEA,MAAMC,uBAA0C;IAC9C,8EAA8E;IAC9E,2EAA2E;IAC3EJ,MAAM;IACNC,KAAK;IACLE,iBAAiB;AACnB;AAEA,MAAME,uBAA4C;IAChD;QACEL,MAAM;QACNC,KAAK;QACLE,iBAAiB;IACnB;IACA;QACEH,MAAM;QACNC,KAAK;QACLE,iBAAiB;IACnB;CACD;AAED,OAAO,eAAeG,uBAAuB,EAC3CC,GAAG,EACHC,OAAO,EACPC,QAAQ,EACRC,gBAAgB,EAChBC,YAAY,EACZC,kBAAkB,EAClBC,WAAW,EACXC,mBAAmB,EACnBC,SAAS,EACTC,WAAW,EACXC,MAAM,EACNC,QAAQ,EACRC,eAAe,EACfC,mBAAmB,KAAK,EACxBC,gBAAgB,EAqBjB;IAKC,M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QAAQG,KAAK,CAACD,IAAIsB,OAAO;YAC3B;QACF,OAAO,IAAItB,eAAeuB,OAAO;YAC/BzB,QAAQG,KAAK,CAACD,IAAIsB,OAAO;QAC3B,OAAO;YACLxB,QAAQG,KAAK,CAACD;QAChB;QACA,MAAMA;IACR;AACF;AAEA;;;;;;CAMC,GACD,OAAO,eAAewB,+BACpBC,OAAqD;IAErD,IAAI;QACF,OAAO,MAAMjE,uBAAuBiE;IACtC,EAAE,OAAM;QACN,6DAA6D;QAC7D,6CAA6C;QAC7CC,QAAQC,IAAI,CAAC;IACf;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/wait.js b/e-commerce/node_modules/next/dist/esm/lib/wait.js
new file mode 100644
index 0000000000000000000000000000000000000000..d115d54e9ebe2edda227cbb1031f95da0bf2cd50
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/wait.js
@@ -0,0 +1,9 @@
+/**
+ * Wait for a given number of milliseconds and then resolve.
+ *
+ * @param ms the number of milliseconds to wait
+ */ export async function wait(ms) {
+ return new Promise((resolve)=>setTimeout(resolve, ms));
+}
+
+//# sourceMappingURL=wait.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/wait.js.map b/e-commerce/node_modules/next/dist/esm/lib/wait.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..6047e3b625be36b9aeec3e15d6154372a60535c2
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/wait.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/wait.ts"],"sourcesContent":["/**\n * Wait for a given number of milliseconds and then resolve.\n *\n * @param ms the number of milliseconds to wait\n */\nexport async function wait(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n"],"names":["wait","ms","Promise","resolve","setTimeout"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,eAAeA,KAAKC,EAAU;IACnC,OAAO,IAAIC,QAAQ,CAACC,UAAYC,WAAWD,SAASF;AACtD","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/warn-missing-react-dependencies.js b/e-commerce/node_modules/next/dist/esm/lib/warn-missing-react-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..ccc011a07ff4a9d65e4cf3d57502e7d220a998e6
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/warn-missing-react-dependencies.js
@@ -0,0 +1,23 @@
+export function warnMissingReactDependencies(projectDir) {
+ // Resolve from the app so downloaded or linked CLI installations do not
+ // warn about dependencies that are already installed in the target project.
+ for (const dependency of [
+ 'react',
+ 'react-dom'
+ ]){
+ try {
+ require.resolve(dependency, {
+ paths: [
+ projectDir
+ ]
+ });
+ } catch (err) {
+ if (err.code !== 'MODULE_NOT_FOUND') {
+ throw err;
+ }
+ console.warn(`The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'`);
+ }
+ }
+}
+
+//# sourceMappingURL=warn-missing-react-dependencies.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/warn-missing-react-dependencies.js.map b/e-commerce/node_modules/next/dist/esm/lib/warn-missing-react-dependencies.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..a61b237adda9073b87e724d7b8224b9516bfbe79
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/warn-missing-react-dependencies.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/warn-missing-react-dependencies.ts"],"sourcesContent":["export function warnMissingReactDependencies(projectDir: string) {\n // Resolve from the app so downloaded or linked CLI installations do not\n // warn about dependencies that are already installed in the target project.\n for (const dependency of ['react', 'react-dom']) {\n try {\n require.resolve(dependency, { paths: [projectDir] })\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code !== 'MODULE_NOT_FOUND') {\n throw err\n }\n\n console.warn(\n `The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install ${dependency}'`\n )\n }\n }\n}\n"],"names":["warnMissingReactDependencies","projectDir","dependency","require","resolve","paths","err","code","console","warn"],"mappings":"AAAA,OAAO,SAASA,6BAA6BC,UAAkB;IAC7D,wEAAwE;IACxE,4EAA4E;IAC5E,KAAK,MAAMC,cAAc;QAAC;QAAS;KAAY,CAAE;QAC/C,IAAI;YACFC,QAAQC,OAAO,CAACF,YAAY;gBAAEG,OAAO;oBAACJ;iBAAW;YAAC;QACpD,EAAE,OAAOK,KAAK;YACZ,IAAI,AAACA,IAA8BC,IAAI,KAAK,oBAAoB;gBAC9D,MAAMD;YACR;YAEAE,QAAQC,IAAI,CACV,CAAC,YAAY,EAAEP,WAAW,4HAA4H,EAAEA,WAAW,CAAC,CAAC;QAEzK;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/with-promise-cache.js b/e-commerce/node_modules/next/dist/esm/lib/with-promise-cache.js
new file mode 100644
index 0000000000000000000000000000000000000000..12012fb439b66ef525b447cc8821f0bbc2981a36
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/with-promise-cache.js
@@ -0,0 +1,14 @@
+export function withPromiseCache(cache, fn, getKey) {
+ return (...values)=>{
+ const key = getKey ? getKey(...values) : values[0];
+ let p = cache.get(key);
+ if (!p) {
+ p = fn(...values);
+ p.catch(()=>cache.remove(key));
+ cache.set(key, p);
+ }
+ return p;
+ };
+}
+
+//# sourceMappingURL=with-promise-cache.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/with-promise-cache.js.map b/e-commerce/node_modules/next/dist/esm/lib/with-promise-cache.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..21b067b3d1a3aee978e43b635d6bdc6e465fad64
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/with-promise-cache.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/with-promise-cache.ts"],"sourcesContent":["import type { LRUCache } from '../server/lib/lru-cache'\n\nexport function withPromiseCache(\n cache: LRUCache>,\n fn: (value: K) => Promise\n): (value: K) => Promise\nexport function withPromiseCache(\n cache: LRUCache>,\n fn: (...values: T) => Promise,\n getKey: (...values: T) => K\n): (...values: T) => Promise\nexport function withPromiseCache(\n cache: LRUCache>,\n fn: (...values: T) => Promise,\n getKey?: (...values: T) => K\n): (...values: T) => Promise {\n return (...values: T) => {\n const key = getKey ? getKey(...values) : values[0]\n let p = cache.get(key)\n if (!p) {\n p = fn(...values)\n p.catch(() => cache.remove(key))\n cache.set(key, p)\n }\n return p\n }\n}\n"],"names":["withPromiseCache","cache","fn","getKey","values","key","p","get","catch","remove","set"],"mappings":"AAWA,OAAO,SAASA,iBACdC,KAA2B,EAC3BC,EAAgC,EAChCC,MAA4B;IAE5B,OAAO,CAAC,GAAGC;QACT,MAAMC,MAAMF,SAASA,UAAUC,UAAUA,MAAM,CAAC,EAAE;QAClD,IAAIE,IAAIL,MAAMM,GAAG,CAACF;QAClB,IAAI,CAACC,GAAG;YACNA,IAAIJ,MAAME;YACVE,EAAEE,KAAK,CAAC,IAAMP,MAAMQ,MAAM,CAACJ;YAC3BJ,MAAMS,GAAG,CAACL,KAAKC;QACjB;QACA,OAAOA;IACT;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/worker.js b/e-commerce/node_modules/next/dist/esm/lib/worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..4dbcbad79430ad492bc51f77870c2d7a1964f002
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/worker.js
@@ -0,0 +1,208 @@
+import { Worker as JestWorker } from 'next/dist/compiled/jest-worker';
+import { Transform } from 'stream';
+import { formatDebugAddress, formatNodeOptions, getNodeDebugType, getParsedDebugAddress, getParsedNodeOptions } from '../server/lib/utils';
+const RESTARTED = Symbol('restarted');
+const cleanupWorkers = (worker)=>{
+ var _worker__workerPool;
+ for (const curWorker of ((_worker__workerPool = worker._workerPool) == null ? void 0 : _worker__workerPool._workers) || []){
+ var _curWorker__child;
+ (_curWorker__child = curWorker._child) == null ? void 0 : _curWorker__child.kill('SIGINT');
+ }
+};
+export function getNextBuildDebuggerPortOffset(_) {
+ // 0: export worker
+ return 0;
+}
+export class Worker {
+ constructor(workerPath, options){
+ let { enableSourceMaps, timeout, onRestart, logger = console, debuggerPortOffset, isolatedMemory, onActivity, onActivityAbort, ...farmOptions } = options;
+ this._onActivity = onActivity;
+ this._onActivityAbort = onActivityAbort;
+ let restartPromise;
+ let resolveRestartPromise;
+ let activeTasks = 0;
+ this._worker = undefined;
+ // ensure we end workers if they weren't before exit
+ process.on('exit', ()=>{
+ this.close();
+ });
+ const nodeOptions = getParsedNodeOptions();
+ const originalOptions = {
+ ...nodeOptions
+ };
+ delete nodeOptions.inspect;
+ delete nodeOptions['inspect-brk'];
+ delete nodeOptions['inspect_brk'];
+ if (debuggerPortOffset !== -1) {
+ const nodeDebugType = getNodeDebugType(originalOptions);
+ if (nodeDebugType) {
+ const debuggerAddress = getParsedDebugAddress(originalOptions[nodeDebugType]);
+ const address = {
+ host: debuggerAddress.host,
+ // current process runs on `address.port`
+ port: debuggerAddress.port === 0 ? 0 : debuggerAddress.port + 1 + debuggerPortOffset
+ };
+ nodeOptions[nodeDebugType] = formatDebugAddress(address);
+ }
+ }
+ if (enableSourceMaps) {
+ nodeOptions['enable-source-maps'] = true;
+ }
+ if (isolatedMemory) {
+ delete nodeOptions['max-old-space-size'];
+ delete nodeOptions['max_old_space_size'];
+ }
+ const { nodeOptions: formattedNodeOptions, execArgv } = formatNodeOptions(nodeOptions);
+ const createWorker = ()=>{
+ var _farmOptions_forkOptions, _farmOptions_forkOptions1;
+ const workerEnv = {
+ ...process.env,
+ ...((_farmOptions_forkOptions = farmOptions.forkOptions) == null ? void 0 : _farmOptions_forkOptions.env) || {},
+ IS_NEXT_WORKER: 'true',
+ NODE_OPTIONS: formattedNodeOptions
+ };
+ if (workerEnv.FORCE_COLOR === undefined) {
+ var _process_stderr;
+ // Mirror the enablement heuristic from picocolors (see https://github.com/vercel/next.js/blob/6a40da0345939fe4f7b1ae519b296a86dd103432/packages/next/src/lib/picocolors.ts#L21-L24).
+ // Picocolors snapshots `process.env`/`stdout.isTTY` at module load time, so when the worker
+ // process bootstraps with piped stdio its own check would disable colors. Re-evaluating the
+ // same conditions here lets us opt the worker into color output only when the parent would
+ // have seen colors, while still respecting explicit opt-outs like NO_COLOR.
+ const supportsColors = !workerEnv.NO_COLOR && !workerEnv.CI && workerEnv.TERM !== 'dumb' && (process.stdout.isTTY || ((_process_stderr = process.stderr) == null ? void 0 : _process_stderr.isTTY));
+ if (supportsColors) {
+ workerEnv.FORCE_COLOR = '1';
+ }
+ }
+ this._worker = new JestWorker(workerPath, {
+ ...farmOptions,
+ forkOptions: {
+ ...farmOptions.forkOptions,
+ execArgv: [
+ ...execArgv,
+ ...((_farmOptions_forkOptions1 = farmOptions.forkOptions) == null ? void 0 : _farmOptions_forkOptions1.execArgv) || []
+ ],
+ env: workerEnv
+ },
+ maxRetries: 0
+ });
+ restartPromise = new Promise((resolve)=>resolveRestartPromise = resolve);
+ /**
+ * Jest Worker has two worker types, ChildProcessWorker (uses child_process) and NodeThreadWorker (uses worker_threads)
+ * Next.js uses ChildProcessWorker by default, but it can be switched to NodeThreadWorker with an experimental flag
+ *
+ * We only want to handle ChildProcessWorker's orphan process issue, so we access the private property "_child":
+ * https://github.com/facebook/jest/blob/b38d7d345a81d97d1dc3b68b8458b1837fbf19be/packages/jest-worker/src/workers/ChildProcessWorker.ts
+ *
+ * But this property is not available in NodeThreadWorker, so we need to check if we are using ChildProcessWorker
+ */ if (!farmOptions.enableWorkerThreads) {
+ var _this__worker__workerPool;
+ for (const worker of ((_this__worker__workerPool = this._worker._workerPool) == null ? void 0 : _this__worker__workerPool._workers) || []){
+ var _worker__child, // if a child process emits a particular message, we track that as activity
+ // so the parent process can keep track of progress
+ _worker__child1;
+ (_worker__child = worker._child) == null ? void 0 : _worker__child.on('exit', (code, signal)=>{
+ if ((code || signal && signal !== 'SIGINT') && this._worker) {
+ logger.error(`Next.js build worker exited with code: ${code} and signal: ${signal}`);
+ // if a child process doesn't exit gracefully, we want to bubble up the exit code to the parent process
+ process.exit(code ?? 1);
+ }
+ });
+ (_worker__child1 = worker._child) == null ? void 0 : _worker__child1.on('message', ([, data])=>{
+ if (data && typeof data === 'object' && 'type' in data && data.type === 'activity') {
+ onActivityImpl();
+ }
+ });
+ }
+ }
+ let aborted = false;
+ const onActivityAbortImpl = ()=>{
+ if (!aborted) {
+ this._onActivityAbort == null ? void 0 : this._onActivityAbort.call(this);
+ aborted = true;
+ }
+ };
+ // Listen to the worker's stdout and stderr, if there's any thing logged, abort the activity first
+ const abortActivityStreamOnLog = new Transform({
+ transform (_chunk, _encoding, callback) {
+ onActivityAbortImpl();
+ callback();
+ }
+ });
+ // Stop the activity if there's any output from the worker
+ this._worker.getStdout().pipe(abortActivityStreamOnLog);
+ this._worker.getStderr().pipe(abortActivityStreamOnLog);
+ // Pipe the worker's stdout and stderr to the parent process
+ this._worker.getStdout().pipe(process.stdout);
+ this._worker.getStderr().pipe(process.stderr);
+ };
+ createWorker();
+ const onHanging = ()=>{
+ const worker = this._worker;
+ if (!worker) return;
+ const resolve = resolveRestartPromise;
+ createWorker();
+ logger.warn(`Sending SIGTERM signal to static worker due to timeout${timeout ? ` of ${timeout / 1000} seconds` : ''}. Subsequent errors may be a result of the worker exiting.`);
+ worker.end().then(()=>{
+ resolve(RESTARTED);
+ });
+ };
+ let hangingTimer = false;
+ const onActivityImpl = ()=>{
+ if (hangingTimer) clearTimeout(hangingTimer);
+ if (this._onActivity) this._onActivity();
+ hangingTimer = activeTasks > 0 && setTimeout(onHanging, timeout);
+ };
+ // TODO: Remove this once callers stop passing non-serializable values
+ // (e.g. functions) in worker method arguments. The structured clone
+ // algorithm used by worker_threads rejects functions, unlike
+ // child_process which silently drops them via JSON serialization.
+ const sanitizeArgs = farmOptions.enableWorkerThreads ? (args)=>JSON.parse(JSON.stringify(args)) : (args)=>args;
+ for (const method of farmOptions.exposedMethods){
+ if (method.startsWith('_')) continue;
+ this[method] = timeout ? async (...args)=>{
+ activeTasks++;
+ const sanitizedArgs = sanitizeArgs(args);
+ try {
+ let attempts = 0;
+ for(;;){
+ onActivityImpl();
+ const result = await Promise.race([
+ this._worker[method](...sanitizedArgs),
+ restartPromise
+ ]);
+ if (result !== RESTARTED) return result;
+ if (onRestart) onRestart(method, sanitizedArgs, ++attempts);
+ }
+ } finally{
+ activeTasks--;
+ onActivityImpl();
+ }
+ } : (...args)=>this._worker[method](...sanitizeArgs(args));
+ }
+ }
+ setOnActivity(onActivity) {
+ this._onActivity = onActivity;
+ }
+ setOnActivityAbort(onActivityAbort) {
+ this._onActivityAbort = onActivityAbort;
+ }
+ end() {
+ const worker = this._worker;
+ if (!worker) {
+ throw new Error('Farm is ended, no more calls can be done to it');
+ }
+ cleanupWorkers(worker);
+ this._worker = undefined;
+ return worker.end();
+ }
+ /**
+ * Quietly end the worker if it exists
+ */ close() {
+ if (this._worker) {
+ cleanupWorkers(this._worker);
+ this._worker.end();
+ }
+ }
+}
+
+//# sourceMappingURL=worker.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/lib/worker.js.map b/e-commerce/node_modules/next/dist/esm/lib/worker.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..5c401e488dfb3ebc171f81099ff90e1fdb3f8885
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/lib/worker.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../src/lib/worker.ts"],"sourcesContent":["import type { ChildProcess } from 'child_process'\nimport { Worker as JestWorker } from 'next/dist/compiled/jest-worker'\nimport { Transform } from 'stream'\nimport {\n formatDebugAddress,\n formatNodeOptions,\n getNodeDebugType,\n getParsedDebugAddress,\n getParsedNodeOptions,\n type DebugAddress,\n} from '../server/lib/utils'\n\ntype FarmOptions = NonNullable[1]>\n\nconst RESTARTED = Symbol('restarted')\n\nconst cleanupWorkers = (worker: JestWorker) => {\n for (const curWorker of ((worker as any)._workerPool?._workers || []) as {\n _child?: ChildProcess\n }[]) {\n curWorker._child?.kill('SIGINT')\n }\n}\n\nexport function getNextBuildDebuggerPortOffset(_: {\n kind: 'export-page'\n}): number {\n // 0: export worker\n return 0\n}\n\nexport class Worker {\n private _worker: JestWorker | undefined\n\n private _onActivity: (() => void) | undefined\n private _onActivityAbort: (() => void) | undefined\n\n constructor(\n workerPath: string,\n options: Omit & {\n forkOptions?:\n | (Omit, 'env'> & {\n env?: Partial | undefined\n })\n | undefined\n /**\n * `-1` if not inspectable\n */\n debuggerPortOffset: number\n enableSourceMaps?: boolean\n /**\n * True if `--max-old-space-size` should not be forwarded to the worker.\n */\n isolatedMemory: boolean\n timeout?: number\n onActivity?: () => void\n onActivityAbort?: () => void\n onRestart?: (method: string, args: any[], attempts: number) => void\n logger?: Pick\n exposedMethods: ReadonlyArray\n enableWorkerThreads?: boolean\n }\n ) {\n let {\n enableSourceMaps,\n timeout,\n onRestart,\n logger = console,\n debuggerPortOffset,\n isolatedMemory,\n onActivity,\n onActivityAbort,\n ...farmOptions\n } = options\n\n this._onActivity = onActivity\n this._onActivityAbort = onActivityAbort\n\n let restartPromise: Promise\n let resolveRestartPromise: (arg: typeof RESTARTED) => void\n let activeTasks = 0\n\n this._worker = undefined\n\n // ensure we end workers if they weren't before exit\n process.on('exit', () => {\n this.close()\n })\n\n const nodeOptions = getParsedNodeOptions()\n const originalOptions = { ...nodeOptions }\n delete nodeOptions.inspect\n delete nodeOptions['inspect-brk']\n delete nodeOptions['inspect_brk']\n if (debuggerPortOffset !== -1) {\n const nodeDebugType = getNodeDebugType(originalOptions)\n if (nodeDebugType) {\n const debuggerAddress = getParsedDebugAddress(\n originalOptions[nodeDebugType]\n )\n const address: DebugAddress = {\n host: debuggerAddress.host,\n // current process runs on `address.port`\n port:\n debuggerAddress.port === 0\n ? 0\n : debuggerAddress.port + 1 + debuggerPortOffset,\n }\n nodeOptions[nodeDebugType] = formatDebugAddress(address)\n }\n }\n\n if (enableSourceMaps) {\n nodeOptions['enable-source-maps'] = true\n }\n\n if (isolatedMemory) {\n delete nodeOptions['max-old-space-size']\n delete nodeOptions['max_old_space_size']\n }\n\n const { nodeOptions: formattedNodeOptions, execArgv } =\n formatNodeOptions(nodeOptions)\n\n const createWorker = () => {\n const workerEnv: NodeJS.ProcessEnv = {\n ...process.env,\n ...((farmOptions.forkOptions?.env || {}) as any),\n IS_NEXT_WORKER: 'true',\n NODE_OPTIONS: formattedNodeOptions,\n }\n\n if (workerEnv.FORCE_COLOR === undefined) {\n // Mirror the enablement heuristic from picocolors (see https://github.com/vercel/next.js/blob/6a40da0345939fe4f7b1ae519b296a86dd103432/packages/next/src/lib/picocolors.ts#L21-L24).\n // Picocolors snapshots `process.env`/`stdout.isTTY` at module load time, so when the worker\n // process bootstraps with piped stdio its own check would disable colors. Re-evaluating the\n // same conditions here lets us opt the worker into color output only when the parent would\n // have seen colors, while still respecting explicit opt-outs like NO_COLOR.\n const supportsColors =\n !workerEnv.NO_COLOR &&\n !workerEnv.CI &&\n workerEnv.TERM !== 'dumb' &&\n (process.stdout.isTTY || process.stderr?.isTTY)\n\n if (supportsColors) {\n workerEnv.FORCE_COLOR = '1'\n }\n }\n\n this._worker = new JestWorker(workerPath, {\n ...farmOptions,\n forkOptions: {\n ...farmOptions.forkOptions,\n execArgv: [...execArgv, ...(farmOptions.forkOptions?.execArgv || [])],\n env: workerEnv,\n },\n maxRetries: 0,\n }) as JestWorker\n restartPromise = new Promise(\n (resolve) => (resolveRestartPromise = resolve)\n )\n\n /**\n * Jest Worker has two worker types, ChildProcessWorker (uses child_process) and NodeThreadWorker (uses worker_threads)\n * Next.js uses ChildProcessWorker by default, but it can be switched to NodeThreadWorker with an experimental flag\n *\n * We only want to handle ChildProcessWorker's orphan process issue, so we access the private property \"_child\":\n * https://github.com/facebook/jest/blob/b38d7d345a81d97d1dc3b68b8458b1837fbf19be/packages/jest-worker/src/workers/ChildProcessWorker.ts\n *\n * But this property is not available in NodeThreadWorker, so we need to check if we are using ChildProcessWorker\n */\n if (!farmOptions.enableWorkerThreads) {\n for (const worker of ((this._worker as any)._workerPool?._workers ||\n []) as {\n _child?: ChildProcess\n }[]) {\n worker._child?.on('exit', (code, signal) => {\n if ((code || (signal && signal !== 'SIGINT')) && this._worker) {\n logger.error(\n `Next.js build worker exited with code: ${code} and signal: ${signal}`\n )\n\n // if a child process doesn't exit gracefully, we want to bubble up the exit code to the parent process\n process.exit(code ?? 1)\n }\n })\n\n // if a child process emits a particular message, we track that as activity\n // so the parent process can keep track of progress\n worker._child?.on('message', ([, data]: [number, unknown]) => {\n if (\n data &&\n typeof data === 'object' &&\n 'type' in data &&\n data.type === 'activity'\n ) {\n onActivityImpl()\n }\n })\n }\n }\n\n let aborted = false\n const onActivityAbortImpl = () => {\n if (!aborted) {\n this._onActivityAbort?.()\n aborted = true\n }\n }\n\n // Listen to the worker's stdout and stderr, if there's any thing logged, abort the activity first\n const abortActivityStreamOnLog = new Transform({\n transform(_chunk, _encoding, callback) {\n onActivityAbortImpl()\n callback()\n },\n })\n // Stop the activity if there's any output from the worker\n this._worker.getStdout().pipe(abortActivityStreamOnLog)\n this._worker.getStderr().pipe(abortActivityStreamOnLog)\n\n // Pipe the worker's stdout and stderr to the parent process\n this._worker.getStdout().pipe(process.stdout)\n this._worker.getStderr().pipe(process.stderr)\n }\n createWorker()\n\n const onHanging = () => {\n const worker = this._worker\n if (!worker) return\n const resolve = resolveRestartPromise\n createWorker()\n logger.warn(\n `Sending SIGTERM signal to static worker due to timeout${\n timeout ? ` of ${timeout / 1000} seconds` : ''\n }. Subsequent errors may be a result of the worker exiting.`\n )\n worker.end().then(() => {\n resolve(RESTARTED)\n })\n }\n\n let hangingTimer: NodeJS.Timeout | false = false\n\n const onActivityImpl = () => {\n if (hangingTimer) clearTimeout(hangingTimer)\n if (this._onActivity) this._onActivity()\n\n hangingTimer = activeTasks > 0 && setTimeout(onHanging, timeout)\n }\n\n // TODO: Remove this once callers stop passing non-serializable values\n // (e.g. functions) in worker method arguments. The structured clone\n // algorithm used by worker_threads rejects functions, unlike\n // child_process which silently drops them via JSON serialization.\n const sanitizeArgs = farmOptions.enableWorkerThreads\n ? (args: any[]) => JSON.parse(JSON.stringify(args))\n : (args: any[]) => args\n\n for (const method of farmOptions.exposedMethods) {\n if (method.startsWith('_')) continue\n ;(this as any)[method] = timeout\n ? // eslint-disable-next-line no-loop-func\n async (...args: any[]) => {\n activeTasks++\n const sanitizedArgs = sanitizeArgs(args)\n try {\n let attempts = 0\n for (;;) {\n onActivityImpl()\n const result = await Promise.race([\n (this._worker as any)[method](...sanitizedArgs),\n restartPromise,\n ])\n if (result !== RESTARTED) return result\n if (onRestart) onRestart(method, sanitizedArgs, ++attempts)\n }\n } finally {\n activeTasks--\n onActivityImpl()\n }\n }\n : (...args: any[]) =>\n (this._worker as any)[method](...sanitizeArgs(args))\n }\n }\n\n setOnActivity(onActivity: (() => void) | undefined): void {\n this._onActivity = onActivity\n }\n setOnActivityAbort(onActivityAbort: (() => void) | undefined): void {\n this._onActivityAbort = onActivityAbort\n }\n\n end(): ReturnType {\n const worker = this._worker\n if (!worker) {\n throw new Error('Farm is ended, no more calls can be done to it')\n }\n cleanupWorkers(worker)\n this._worker = undefined\n return worker.end()\n }\n\n /**\n * Quietly end the worker if it exists\n */\n close(): void {\n if (this._worker) {\n cleanupWorkers(this._worker)\n this._worker.end()\n }\n }\n}\n"],"names":["Worker","JestWorker","Transform","formatDebugAddress","formatNodeOptions","getNodeDebugType","getParsedDebugAddress","getParsedNodeOptions","RESTARTED","Symbol","cleanupWorkers","worker","curWorker","_workerPool","_workers","_child","kill","getNextBuildDebuggerPortOffset","_","constructor","workerPath","options","enableSourceMaps","timeout","onRestart","logger","console","debuggerPortOffset","isolatedMemory","onActivity","onActivityAbort","farmOptions","_onActivity","_onActivityAbort","restartPromise","resolveRestartPromise","activeTasks","_worker","undefined","process","on","close","nodeOptions","originalOptions","inspect","nodeDebugType","debuggerAddress","address","host","port","formattedNodeOptions","execArgv","createWorker","workerEnv","env","forkOptions","IS_NEXT_WORKER","NODE_OPTIONS","FORCE_COLOR","supportsColors","NO_COLOR","CI","TERM","stdout","isTTY","stderr","maxRetries","Promise","resolve","enableWorkerThreads","code","signal","error","exit","data","type","onActivityImpl","aborted","onActivityAbortImpl","abortActivityStreamOnLog","transform","_chunk","_encoding","callback","getStdout","pipe","getStderr","onHanging","warn","end","then","hangingTimer","clearTimeout","setTimeout","sanitizeArgs","args","JSON","parse","stringify","method","exposedMethods","startsWith","sanitizedArgs","attempts","result","race","setOnActivity","setOnActivityAbort","Error"],"mappings":"AACA,SAASA,UAAUC,UAAU,QAAQ,iCAAgC;AACrE,SAASC,SAAS,QAAQ,SAAQ;AAClC,SACEC,kBAAkB,EAClBC,iBAAiB,EACjBC,gBAAgB,EAChBC,qBAAqB,EACrBC,oBAAoB,QAEf,sBAAqB;AAI5B,MAAMC,YAAYC,OAAO;AAEzB,MAAMC,iBAAiB,CAACC;QACG;IAAzB,KAAK,MAAMC,aAAc,EAAA,sBAAA,AAACD,OAAeE,WAAW,qBAA3B,oBAA6BC,QAAQ,KAAI,EAAE,CAE/D;YACHF;SAAAA,oBAAAA,UAAUG,MAAM,qBAAhBH,kBAAkBI,IAAI,CAAC;IACzB;AACF;AAEA,OAAO,SAASC,+BAA+BC,CAE9C;IACC,mBAAmB;IACnB,OAAO;AACT;AAEA,OAAO,MAAMlB;IAMXmB,YACEC,UAAkB,EAClBC,OAsBC,CACD;QACA,IAAI,EACFC,gBAAgB,EAChBC,OAAO,EACPC,SAAS,EACTC,SAASC,OAAO,EAChBC,kBAAkB,EAClBC,cAAc,EACdC,UAAU,EACVC,eAAe,EACf,GAAGC,aACJ,GAAGV;QAEJ,IAAI,CAACW,WAAW,GAAGH;QACnB,IAAI,CAACI,gBAAgB,GAAGH;QAExB,IAAII;QACJ,IAAIC;QACJ,IAAIC,cAAc;QAEl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ClB;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/attach-nodejs-debugger-middleware.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/attach-nodejs-debugger-middleware.js
new file mode 100644
index 0000000000000000000000000000000000000000..dfc1dc2e4e218888b0fdf89cb43c9d7a9a3e3955
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/attach-nodejs-debugger-middleware.js
@@ -0,0 +1,34 @@
+import { middlewareResponse } from './middleware-response';
+import * as inspector from 'inspector';
+export function getAttachNodejsDebuggerMiddleware() {
+ return async function(req, res, next) {
+ const { pathname } = new URL(`http://n${req.url}`);
+ if (pathname !== '/__nextjs_attach-nodejs-inspector') {
+ return next();
+ }
+ try {
+ const isInspecting = inspector.url() !== undefined;
+ const debugPort = process.debugPort;
+ if (!isInspecting) {
+ // Node.js will already log that the inspector is listening.
+ inspector.open(debugPort);
+ }
+ const inspectorURLRaw = inspector.url();
+ if (inspectorURLRaw === undefined) {
+ // could not open, possibly because already in use.
+ return middlewareResponse.badRequest(res, `Failed to open port "${debugPort}". Address may be already in use.`);
+ }
+ const inspectorURL = new URL(inspectorURLRaw);
+ const debugInfoListResponse = await fetch(`http://${inspectorURL.host}/json/list`);
+ const debugInfoList = await debugInfoListResponse.json();
+ if (!Array.isArray(debugInfoList) || debugInfoList.length === 0) {
+ throw new Error('No debug targets found');
+ }
+ return middlewareResponse.json(res, debugInfoList[0].devtoolsFrontendUrl);
+ } catch (error) {
+ return middlewareResponse.internalServerError(res);
+ }
+ };
+}
+
+//# sourceMappingURL=attach-nodejs-debugger-middleware.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/attach-nodejs-debugger-middleware.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/attach-nodejs-debugger-middleware.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2a94045cd4c9054e9d7488e99ece3300372d51dc
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/attach-nodejs-debugger-middleware.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/server/attach-nodejs-debugger-middleware.ts"],"sourcesContent":["import { middlewareResponse } from './middleware-response'\nimport type { ServerResponse, IncomingMessage } from 'http'\nimport * as inspector from 'inspector'\n\nexport function getAttachNodejsDebuggerMiddleware() {\n return async function (\n req: IncomingMessage,\n res: ServerResponse,\n next: () => void\n ): Promise {\n const { pathname } = new URL(`http://n${req.url}`)\n\n if (pathname !== '/__nextjs_attach-nodejs-inspector') {\n return next()\n }\n\n try {\n const isInspecting = inspector.url() !== undefined\n const debugPort = process.debugPort\n if (!isInspecting) {\n // Node.js will already log that the inspector is listening.\n inspector.open(debugPort)\n }\n\n const inspectorURLRaw = inspector.url()\n if (inspectorURLRaw === undefined) {\n // could not open, possibly because already in use.\n return middlewareResponse.badRequest(\n res,\n `Failed to open port \"${debugPort}\". Address may be already in use.`\n )\n }\n const inspectorURL = new URL(inspectorURLRaw)\n\n const debugInfoListResponse = await fetch(\n `http://${inspectorURL.host}/json/list`\n )\n const debugInfoList = await debugInfoListResponse.json()\n if (!Array.isArray(debugInfoList) || debugInfoList.length === 0) {\n throw new Error('No debug targets found')\n }\n\n return middlewareResponse.json(res, debugInfoList[0].devtoolsFrontendUrl)\n } catch (error) {\n return middlewareResponse.internalServerError(res)\n }\n }\n}\n"],"names":["middlewareResponse","inspector","getAttachNodejsDebuggerMiddleware","req","res","next","pathname","URL","url","isInspecting","undefined","debugPort","process","open","inspectorURLRaw","badRequest","inspectorURL","debugInfoListResponse","fetch","host","debugInfoList","json","Array","isArray","length","Error","devtoolsFrontendUrl","error","internalServerError"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,wBAAuB;AAE1D,YAAYC,eAAe,YAAW;AAEtC,OAAO,SAASC;IACd,OAAO,eACLC,GAAoB,EACpBC,GAAmB,EACnBC,IAAgB;QAEhB,MAAM,EAAEC,QAAQ,EAAE,GAAG,IAAIC,IAAI,CAAC,QAAQ,EAAEJ,IAAIK,GAAG,EAAE;QAEjD,IAAIF,aAAa,qCAAqC;YACpD,OAAOD;QACT;QAEA,IAAI;YACF,MAAMI,eAAeR,UAAUO,GAAG,OAAOE;YACzC,MAAMC,YAAYC,QAAQD,SAAS;YACnC,IAAI,CAACF,cAAc;gBACjB,4DAA4D;gBAC5DR,UAAUY,IAAI,CAACF;YACjB;YAEA,MAAMG,kBAAkBb,UAAUO,GAAG;YACrC,IAAIM,oBAAoBJ,WAAW;gBACjC,mDAAmD;gBACnD,OAAOV,mBAAmBe,UAAU,CAClCX,KACA,CAAC,qBAAqB,EAAEO,UAAU,iCAAiC,CAAC;YAExE;YACA,MAAMK,eAAe,IAAIT,IAAIO;YAE7B,MAAMG,wBAAwB,MAAMC,MAClC,CAAC,OAAO,EAAEF,aAAaG,IAAI,CAAC,UAAU,CAAC;YAEzC,MAAMC,gBAAgB,MAAMH,sBAAsBI,IAAI;YACtD,IAAI,CAACC,MAAMC,OAAO,CAACH,kBAAkBA,cAAcI,MAAM,KAAK,GAAG;gBAC/D,MAAM,IAAIC,MAAM;YAClB;YAEA,OAAOzB,mBAAmBqB,IAAI,CAACjB,KAAKgB,aAAa,CAAC,EAAE,CAACM,mBAAmB;QAC1E,EAAE,OAAOC,OAAO;YACd,OAAO3B,mBAAmB4B,mBAAmB,CAACxB;QAChD;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/dev-indicator-middleware.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/dev-indicator-middleware.js
new file mode 100644
index 0000000000000000000000000000000000000000..cd53674b6c9242edec9e0975bb991afb8ece0256
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/dev-indicator-middleware.js
@@ -0,0 +1,25 @@
+import { middlewareResponse } from './middleware-response';
+import * as Log from '../../build/output/log';
+import { devIndicatorServerState } from '../../server/dev/dev-indicator-server-state';
+const DISABLE_DEV_INDICATOR_PREFIX = '/__nextjs_disable_dev_indicator';
+const COOLDOWN_TIME_MS = process.env.__NEXT_DEV_INDICATOR_COOLDOWN_MS ? parseInt(process.env.__NEXT_DEV_INDICATOR_COOLDOWN_MS) : 1000 * 60 * 60 * 24;
+export function getDisableDevIndicatorMiddleware() {
+ return async function disableDevIndicatorMiddleware(req, res, next) {
+ try {
+ const { pathname } = new URL(`http://n${req.url}`);
+ if (!pathname.startsWith(DISABLE_DEV_INDICATOR_PREFIX)) {
+ return next();
+ }
+ if (req.method !== 'POST') {
+ return middlewareResponse.methodNotAllowed(res);
+ }
+ devIndicatorServerState.disabledUntil = Date.now() + COOLDOWN_TIME_MS;
+ return middlewareResponse.noContent(res);
+ } catch (err) {
+ Log.error('Failed to disable the dev indicator:', err instanceof Error ? err.message : err);
+ return middlewareResponse.internalServerError(res);
+ }
+ };
+}
+
+//# sourceMappingURL=dev-indicator-middleware.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/dev-indicator-middleware.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/dev-indicator-middleware.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2474f876e84fba6f1bcec56317de14fba90cf6d8
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/dev-indicator-middleware.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/server/dev-indicator-middleware.ts"],"sourcesContent":["import type { ServerResponse, IncomingMessage } from 'http'\nimport { middlewareResponse } from './middleware-response'\nimport * as Log from '../../build/output/log'\nimport { devIndicatorServerState } from '../../server/dev/dev-indicator-server-state'\n\nconst DISABLE_DEV_INDICATOR_PREFIX = '/__nextjs_disable_dev_indicator'\n\nconst COOLDOWN_TIME_MS = process.env.__NEXT_DEV_INDICATOR_COOLDOWN_MS\n ? parseInt(process.env.__NEXT_DEV_INDICATOR_COOLDOWN_MS)\n : // 1 day from now\n 1000 * 60 * 60 * 24\n\nexport function getDisableDevIndicatorMiddleware() {\n return async function disableDevIndicatorMiddleware(\n req: IncomingMessage,\n res: ServerResponse,\n next: () => void\n ): Promise {\n try {\n const { pathname } = new URL(`http://n${req.url}`)\n\n if (!pathname.startsWith(DISABLE_DEV_INDICATOR_PREFIX)) {\n return next()\n }\n\n if (req.method !== 'POST') {\n return middlewareResponse.methodNotAllowed(res)\n }\n\n devIndicatorServerState.disabledUntil = Date.now() + COOLDOWN_TIME_MS\n\n return middlewareResponse.noContent(res)\n } catch (err) {\n Log.error(\n 'Failed to disable the dev indicator:',\n err instanceof Error ? err.message : err\n )\n return middlewareResponse.internalServerError(res)\n }\n }\n}\n"],"names":["middlewareResponse","Log","devIndicatorServerState","DISABLE_DEV_INDICATOR_PREFIX","COOLDOWN_TIME_MS","process","env","__NEXT_DEV_INDICATOR_COOLDOWN_MS","parseInt","getDisableDevIndicatorMiddleware","disableDevIndicatorMiddleware","req","res","next","pathname","URL","url","startsWith","method","methodNotAllowed","disabledUntil","Date","now","noContent","err","error","Error","message","internalServerError"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,wBAAuB;AAC1D,YAAYC,SAAS,yBAAwB;AAC7C,SAASC,uBAAuB,QAAQ,8CAA6C;AAErF,MAAMC,+BAA+B;AAErC,MAAMC,mBAAmBC,QAAQC,GAAG,CAACC,gCAAgC,GACjEC,SAASH,QAAQC,GAAG,CAACC,gCAAgC,IAErD,OAAO,KAAK,KAAK;AAErB,OAAO,SAASE;IACd,OAAO,eAAeC,8BACpBC,GAAoB,EACpBC,GAAmB,EACnBC,IAAgB;QAEhB,IAAI;YACF,MAAM,EAAEC,QAAQ,EAAE,GAAG,IAAIC,IAAI,CAAC,QAAQ,EAAEJ,IAAIK,GAAG,EAAE;YAEjD,IAAI,CAACF,SAASG,UAAU,CAACd,+BAA+B;gBACtD,OAAOU;YACT;YAEA,IAAIF,IAAIO,MAAM,KAAK,QAAQ;gBACzB,OAAOlB,mBAAmBmB,gBAAgB,CAACP;YAC7C;YAEAV,wBAAwBkB,aAAa,GAAGC,KAAKC,GAAG,KAAKlB;YAErD,OAAOJ,mBAAmBuB,SAAS,CAACX;QACtC,EAAE,OAAOY,KAAK;YACZvB,IAAIwB,KAAK,CACP,wCACAD,eAAeE,QAAQF,IAAIG,OAAO,GAAGH;YAEvC,OAAOxB,mBAAmB4B,mBAAmB,CAAChB;QAChD;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/devtools-config-middleware.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/devtools-config-middleware.js
new file mode 100644
index 0000000000000000000000000000000000000000..5f7804fa464152415dbc3ed5c31466f2f8f481d7
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/devtools-config-middleware.js
@@ -0,0 +1,54 @@
+import { existsSync } from 'fs';
+import { readFile, writeFile, mkdir } from 'fs/promises';
+import { dirname, join } from 'path';
+import { middlewareResponse } from './middleware-response';
+import { devToolsConfigSchema } from '../shared/devtools-config-schema';
+import { deepMerge } from '../shared/deepmerge';
+const DEVTOOLS_CONFIG_FILENAME = 'next-devtools-config.json';
+const DEVTOOLS_CONFIG_MIDDLEWARE_ENDPOINT = '/__nextjs_devtools_config';
+export function devToolsConfigMiddleware({ distDir, sendUpdateSignal }) {
+ const configPath = join(distDir, 'cache', DEVTOOLS_CONFIG_FILENAME);
+ return async function devToolsConfigMiddlewareHandler(req, res, next) {
+ const { pathname } = new URL(`http://n${req.url}`);
+ if (pathname !== DEVTOOLS_CONFIG_MIDDLEWARE_ENDPOINT) {
+ return next();
+ }
+ if (req.method !== 'POST') {
+ return middlewareResponse.methodNotAllowed(res);
+ }
+ const currentConfig = await getDevToolsConfig(distDir);
+ const chunks = [];
+ for await (const chunk of req){
+ chunks.push(Buffer.from(chunk));
+ }
+ let body = Buffer.concat(chunks).toString('utf8');
+ try {
+ body = JSON.parse(body);
+ } catch (error) {
+ console.error('[Next.js DevTools] Invalid config body passed:', error);
+ return middlewareResponse.badRequest(res);
+ }
+ const validation = devToolsConfigSchema.safeParse(body);
+ if (!validation.success) {
+ console.error('[Next.js DevTools] Invalid config passed:', validation.error.message);
+ return middlewareResponse.badRequest(res);
+ }
+ const newConfig = deepMerge(currentConfig, validation.data);
+ await writeFile(configPath, JSON.stringify(newConfig, null, 2));
+ sendUpdateSignal(newConfig);
+ return middlewareResponse.noContent(res);
+ };
+}
+export async function getDevToolsConfig(distDir) {
+ const configPath = join(distDir, 'cache', DEVTOOLS_CONFIG_FILENAME);
+ if (!existsSync(configPath)) {
+ await mkdir(dirname(configPath), {
+ recursive: true
+ });
+ await writeFile(configPath, JSON.stringify({}));
+ return {};
+ }
+ return JSON.parse(await readFile(configPath, 'utf8'));
+}
+
+//# sourceMappingURL=devtools-config-middleware.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/devtools-config-middleware.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/devtools-config-middleware.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..38253b6e92e46486601f8838134242f4d9734e99
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/devtools-config-middleware.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/server/devtools-config-middleware.ts"],"sourcesContent":["import type { IncomingMessage, ServerResponse } from 'http'\nimport type { DevToolsConfig } from '../dev-overlay/shared'\n\nimport { existsSync } from 'fs'\nimport { readFile, writeFile, mkdir } from 'fs/promises'\nimport { dirname, join } from 'path'\n\nimport { middlewareResponse } from './middleware-response'\nimport { devToolsConfigSchema } from '../shared/devtools-config-schema'\nimport { deepMerge } from '../shared/deepmerge'\n\nconst DEVTOOLS_CONFIG_FILENAME = 'next-devtools-config.json'\nconst DEVTOOLS_CONFIG_MIDDLEWARE_ENDPOINT = '/__nextjs_devtools_config'\n\nexport function devToolsConfigMiddleware({\n distDir,\n sendUpdateSignal,\n}: {\n distDir: string\n sendUpdateSignal: (data: DevToolsConfig) => void\n}) {\n const configPath = join(distDir, 'cache', DEVTOOLS_CONFIG_FILENAME)\n\n return async function devToolsConfigMiddlewareHandler(\n req: IncomingMessage,\n res: ServerResponse,\n next: () => void\n ): Promise {\n const { pathname } = new URL(`http://n${req.url}`)\n\n if (pathname !== DEVTOOLS_CONFIG_MIDDLEWARE_ENDPOINT) {\n return next()\n }\n\n if (req.method !== 'POST') {\n return middlewareResponse.methodNotAllowed(res)\n }\n\n const currentConfig = await getDevToolsConfig(distDir)\n\n const chunks: Buffer[] = []\n for await (const chunk of req) {\n chunks.push(Buffer.from(chunk))\n }\n\n let body = Buffer.concat(chunks).toString('utf8')\n try {\n body = JSON.parse(body)\n } catch (error) {\n console.error('[Next.js DevTools] Invalid config body passed:', error)\n return middlewareResponse.badRequest(res)\n }\n\n const validation = devToolsConfigSchema.safeParse(body)\n if (!validation.success) {\n console.error(\n '[Next.js DevTools] Invalid config passed:',\n validation.error.message\n )\n return middlewareResponse.badRequest(res)\n }\n\n const newConfig = deepMerge(currentConfig, validation.data)\n await writeFile(configPath, JSON.stringify(newConfig, null, 2))\n\n sendUpdateSignal(newConfig)\n\n return middlewareResponse.noContent(res)\n }\n}\n\nexport async function getDevToolsConfig(\n distDir: string\n): Promise {\n const configPath = join(distDir, 'cache', DEVTOOLS_CONFIG_FILENAME)\n\n if (!existsSync(configPath)) {\n await mkdir(dirname(configPath), { recursive: true })\n await writeFile(configPath, JSON.stringify({}))\n return {}\n }\n\n return JSON.parse(await readFile(configPath, 'utf8'))\n}\n"],"names":["existsSync","readFile","writeFile","mkdir","dirname","join","middlewareResponse","devToolsConfigSchema","deepMerge","DEVTOOLS_CONFIG_FILENAME","DEVTOOLS_CONFIG_MIDDLEWARE_ENDPOINT","devToolsConfigMiddleware","distDir","sendUpdateSignal","configPath","devToolsConfigMiddlewareHandler","req","res","next","pathname","URL","url","method","methodNotAllowed","currentConfig","getDevToolsConfig","chunks","chunk","push","Buffer","from","body","concat","toString","JSON","parse","error","console","badRequest","validation","safeParse","success","message","newConfig","data","stringify","noContent","recursive"],"mappings":"AAGA,SAASA,UAAU,QAAQ,KAAI;AAC/B,SAASC,QAAQ,EAAEC,SAAS,EAAEC,KAAK,QAAQ,cAAa;AACxD,SAASC,OAAO,EAAEC,IAAI,QAAQ,OAAM;AAEpC,SAASC,kBAAkB,QAAQ,wBAAuB;AAC1D,SAASC,oBAAoB,QAAQ,mCAAkC;AACvE,SAASC,SAAS,QAAQ,sBAAqB;AAE/C,MAAMC,2BAA2B;AACjC,MAAMC,sCAAsC;AAE5C,OAAO,SAASC,yBAAyB,EACvCC,OAAO,EACPC,gBAAgB,EAIjB;IACC,MAAMC,aAAaT,KAAKO,SAAS,SAASH;IAE1C,OAAO,eAAeM,gCACpBC,GAAoB,EACpBC,GAAmB,EACnBC,IAAgB;QAEhB,MAAM,EAAEC,QAAQ,EAAE,GAAG,IAAIC,IAAI,CAAC,QAAQ,EAAEJ,IAAIK,GAAG,EAAE;QAEjD,IAAIF,aAAaT,qCAAqC;YACpD,OAAOQ;QACT;QAEA,IAAIF,IAAIM,MAAM,KAAK,QAAQ;YACzB,OAAOhB,mBAAmBiB,gBAAgB,CAACN;QAC7C;QAEA,MAAMO,gBAAgB,MAAMC,kBAAkBb;QAE9C,MAAMc,SAAmB,EAAE;QAC3B,WAAW,MAAMC,SAASX,IAAK;YAC7BU,OAAOE,IAAI,CAACC,OAAOC,IAAI,CAACH;QAC1B;QAEA,IAAII,OAAOF,OAAOG,MAAM,CAACN,QAAQO,QAAQ,CAAC;QAC1C,IAAI;YACFF,OAAOG,KAAKC,KAAK,CAACJ;QACpB,EAAE,OAAOK,OAAO;YACdC,QAAQD,KAAK,CAAC,kDAAkDA;YAChE,OAAO9B,mBAAmBgC,UAAU,CAACrB;QACvC;QAEA,MAAMsB,aAAahC,qBAAqBiC,SAAS,CAACT;QAClD,IAAI,CAACQ,WAAWE,OAAO,EAAE;YACvBJ,QAAQD,KAAK,CACX,6CACAG,WAAWH,KAAK,CAACM,OAAO;YAE1B,OAAOpC,mBAAmBgC,UAAU,CAACrB;QACvC;QAEA,MAAM0B,YAAYnC,UAAUgB,eAAee,WAAWK,IAAI;QAC1D,MAAM1C,UAAUY,YAAYoB,KAAKW,SAAS,CAACF,WAAW,MAAM;QAE5D9B,iBAAiB8B;QAEjB,OAAOrC,mBAAmBwC,SAAS,CAAC7B;IACtC;AACF;AAEA,OAAO,eAAeQ,kBACpBb,OAAe;IAEf,MAAME,aAAaT,KAAKO,SAAS,SAASH;IAE1C,IAAI,CAACT,WAAWc,aAAa;QAC3B,MAAMX,MAAMC,QAAQU,aAAa;YAAEiC,WAAW;QAAK;QACnD,MAAM7C,UAAUY,YAAYoB,KAAKW,SAAS,CAAC,CAAC;QAC5C,OAAO,CAAC;IACV;IAEA,OAAOX,KAAKC,KAAK,CAAC,MAAMlC,SAASa,YAAY;AAC/C","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-latin-ext.woff2 b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-latin-ext.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..e36649933f3a206057fe1068cff2e5078f043c59
Binary files /dev/null and b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-latin-ext.woff2 differ
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-latin.woff2 b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-latin.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..445e0e55cbb80e4a1fd7d429c4384b61b453da2b
Binary files /dev/null and b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-latin.woff2 differ
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin-ext.woff2 b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin-ext.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..944424f972b9f9c985163da8096a25b214fa1983
Binary files /dev/null and b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin-ext.woff2 differ
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin.woff2 b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..68eeb7f4bd4a789bc1600f76e6ebac0a0c170d46
Binary files /dev/null and b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin.woff2 differ
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/get-dev-overlay-font-middleware.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/get-dev-overlay-font-middleware.js
new file mode 100644
index 0000000000000000000000000000000000000000..7adfeed1a6b235190b91c2715f0f5f26dec2d519
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/get-dev-overlay-font-middleware.js
@@ -0,0 +1,53 @@
+import path from 'path';
+import * as fs from 'fs/promises';
+import { constants } from 'fs';
+import * as Log from '../../../build/output/log';
+import { middlewareResponse } from '../middleware-response';
+const FONT_PREFIX = '/__nextjs_font/';
+const VALID_FONTS = [
+ 'geist-latin-ext.woff2',
+ 'geist-mono-latin-ext.woff2',
+ 'geist-latin.woff2',
+ 'geist-mono-latin.woff2'
+];
+const FONT_HEADERS = {
+ 'Content-Type': 'font/woff2',
+ 'Cache-Control': 'public, max-age=31536000, immutable'
+};
+export function getDevOverlayFontMiddleware() {
+ return async function devOverlayFontMiddleware(req, res, next) {
+ try {
+ const { pathname } = new URL(`http://n${req.url}`);
+ if (!pathname.startsWith(FONT_PREFIX)) {
+ return next();
+ }
+ const fontFile = pathname.replace(FONT_PREFIX, '');
+ if (!VALID_FONTS.includes(fontFile)) {
+ return middlewareResponse.notFound(res);
+ }
+ const fontPath = path.resolve(__dirname, fontFile);
+ const fileExists = await checkFileExists(fontPath);
+ if (!fileExists) {
+ return middlewareResponse.notFound(res);
+ }
+ const fontData = await fs.readFile(fontPath);
+ Object.entries(FONT_HEADERS).forEach(([key, value])=>{
+ res.setHeader(key, value);
+ });
+ res.end(fontData);
+ } catch (err) {
+ Log.error('Failed to serve font:', err instanceof Error ? err.message : err);
+ return middlewareResponse.internalServerError(res);
+ }
+ };
+}
+async function checkFileExists(filePath) {
+ try {
+ await fs.access(filePath, constants.F_OK);
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+//# sourceMappingURL=get-dev-overlay-font-middleware.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/get-dev-overlay-font-middleware.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/get-dev-overlay-font-middleware.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..be9f023cbccadd0c686970c4f95212370a54c1f8
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/font/get-dev-overlay-font-middleware.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/server/font/get-dev-overlay-font-middleware.ts"],"sourcesContent":["import type { ServerResponse, IncomingMessage } from 'http'\nimport path from 'path'\nimport * as fs from 'fs/promises'\nimport { constants } from 'fs'\nimport * as Log from '../../../build/output/log'\nimport { middlewareResponse } from '../middleware-response'\n\nconst FONT_PREFIX = '/__nextjs_font/'\n\nconst VALID_FONTS = [\n 'geist-latin-ext.woff2',\n 'geist-mono-latin-ext.woff2',\n 'geist-latin.woff2',\n 'geist-mono-latin.woff2',\n]\n\nconst FONT_HEADERS = {\n 'Content-Type': 'font/woff2',\n 'Cache-Control': 'public, max-age=31536000, immutable',\n} as const\n\nexport function getDevOverlayFontMiddleware() {\n return async function devOverlayFontMiddleware(\n req: IncomingMessage,\n res: ServerResponse,\n next: () => void\n ): Promise {\n try {\n const { pathname } = new URL(`http://n${req.url}`)\n\n if (!pathname.startsWith(FONT_PREFIX)) {\n return next()\n }\n\n const fontFile = pathname.replace(FONT_PREFIX, '')\n if (!VALID_FONTS.includes(fontFile)) {\n return middlewareResponse.notFound(res)\n }\n\n const fontPath = path.resolve(__dirname, fontFile)\n const fileExists = await checkFileExists(fontPath)\n\n if (!fileExists) {\n return middlewareResponse.notFound(res)\n }\n\n const fontData = await fs.readFile(fontPath)\n Object.entries(FONT_HEADERS).forEach(([key, value]) => {\n res.setHeader(key, value)\n })\n res.end(fontData)\n } catch (err) {\n Log.error(\n 'Failed to serve font:',\n err instanceof Error ? err.message : err\n )\n return middlewareResponse.internalServerError(res)\n }\n }\n}\n\nasync function checkFileExists(filePath: string): Promise {\n try {\n await fs.access(filePath, constants.F_OK)\n return true\n } catch {\n return false\n }\n}\n"],"names":["path","fs","constants","Log","middlewareResponse","FONT_PREFIX","VALID_FONTS","FONT_HEADERS","getDevOverlayFontMiddleware","devOverlayFontMiddleware","req","res","next","pathname","URL","url","startsWith","fontFile","replace","includes","notFound","fontPath","resolve","__dirname","fileExists","checkFileExists","fontData","readFile","Object","entries","forEach","key","value","setHeader","end","err","error","Error","message","internalServerError","filePath","access","F_OK"],"mappings":"AACA,OAAOA,UAAU,OAAM;AACvB,YAAYC,QAAQ,cAAa;AACjC,SAASC,SAAS,QAAQ,KAAI;AAC9B,YAAYC,SAAS,4BAA2B;AAChD,SAASC,kBAAkB,QAAQ,yBAAwB;AAE3D,MAAMC,cAAc;AAEpB,MAAMC,cAAc;IAClB;IACA;IACA;IACA;CACD;AAED,MAAMC,eAAe;IACnB,gBAAgB;IAChB,iBAAiB;AACnB;AAEA,OAAO,SAASC;IACd,OAAO,eAAeC,yBACpBC,GAAoB,EACpBC,GAAmB,EACnBC,IAAgB;QAEhB,IAAI;YACF,MAAM,EAAEC,QAAQ,EAAE,GAAG,IAAIC,IAAI,CAAC,QAAQ,EAAEJ,IAAIK,GAAG,EAAE;YAEjD,IAAI,CAACF,SAASG,UAAU,CAACX,cAAc;gBACrC,OAAOO;YACT;YAEA,MAAMK,WAAWJ,SAASK,OAAO,CAACb,aAAa;YAC/C,IAAI,CAACC,YAAYa,QAAQ,CAACF,WAAW;gBACnC,OAAOb,mBAAmBgB,QAAQ,CAACT;YACrC;YAEA,MAAMU,WAAWrB,KAAKsB,OAAO,CAACC,WAAWN;YACzC,MAAMO,aAAa,MAAMC,gBAAgBJ;YAEzC,IAAI,CAACG,YAAY;gBACf,OAAOpB,mBAAmBgB,QAAQ,CAACT;YACrC;YAEA,MAAMe,WAAW,MAAMzB,GAAG0B,QAAQ,CAACN;YACnCO,OAAOC,OAAO,CAACtB,cAAcuB,OAAO,CAAC,CAAC,CAACC,KAAKC,MAAM;gBAChDrB,IAAIsB,SAAS,CAACF,KAAKC;YACrB;YACArB,IAAIuB,GAAG,CAACR;QACV,EAAE,OAAOS,KAAK;YACZhC,IAAIiC,KAAK,CACP,yBACAD,eAAeE,QAAQF,IAAIG,OAAO,GAAGH;YAEvC,OAAO/B,mBAAmBmC,mBAAmB,CAAC5B;QAChD;IACF;AACF;AAEA,eAAec,gBAAgBe,QAAgB;IAC7C,IAAI;QACF,MAAMvC,GAAGwC,MAAM,CAACD,UAAUtC,UAAUwC,IAAI;QACxC,OAAO;IACT,EAAE,OAAM;QACN,OAAO;IACT;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/launch-editor.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/launch-editor.js
new file mode 100644
index 0000000000000000000000000000000000000000..f391f40616f5b4f1b466574bcba24d2a373e70e8
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/launch-editor.js
@@ -0,0 +1,442 @@
+/**
+ * MIT License
+ *
+ * Copyright (c) 2015-present, Facebook, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */ import { cyan, green, red } from '../../lib/picocolors';
+import child_process from 'child_process';
+import fs from 'fs';
+import fsp from 'fs/promises';
+import os from 'os';
+import path from 'path';
+import { fileURLToPath } from 'url';
+import shellQuote from 'next/dist/compiled/shell-quote';
+function isTerminalEditor(editor) {
+ switch(editor){
+ case 'vi':
+ case 'vim':
+ case 'nvim':
+ case 'emacs':
+ case 'nano':
+ {
+ return true;
+ }
+ default:
+ {}
+ }
+ return false;
+}
+// Map from full process name to binary that starts the process
+// We can't just re-use full process name, because it will spawn a new instance
+// of the app every time
+const COMMON_EDITORS_MACOS = {
+ '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
+ '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
+ '/Applications/Brackets.app/Contents/MacOS/Brackets': 'brackets',
+ '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
+ '/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl',
+ '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
+ '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code',
+ '/Applications/Visual Studio Code.app/Contents/MacOS/Code': '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code',
+ '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron': '/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code',
+ '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders': '/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code',
+ '/Applications/VSCodium.app/Contents/MacOS/Electron': '/Applications/VSCodium.app/Contents/Resources/app/bin/code',
+ '/Applications/AppCode.app/Contents/MacOS/appcode': '/Applications/AppCode.app/Contents/MacOS/appcode',
+ '/Applications/CLion.app/Contents/MacOS/clion': '/Applications/CLion.app/Contents/MacOS/clion',
+ '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
+ '/Applications/PhpStorm.app/Contents/MacOS/phpstorm': '/Applications/PhpStorm.app/Contents/MacOS/phpstorm',
+ '/Applications/PyCharm.app/Contents/MacOS/pycharm': '/Applications/PyCharm.app/Contents/MacOS/pycharm',
+ '/Applications/PyCharm CE.app/Contents/MacOS/pycharm': '/Applications/PyCharm CE.app/Contents/MacOS/pycharm',
+ '/Applications/RubyMine.app/Contents/MacOS/rubymine': '/Applications/RubyMine.app/Contents/MacOS/rubymine',
+ '/Applications/WebStorm.app/Contents/MacOS/webstorm': '/Applications/WebStorm.app/Contents/MacOS/webstorm',
+ '/Applications/MacVim.app/Contents/MacOS/MacVim': 'mvim',
+ '/Applications/GoLand.app/Contents/MacOS/goland': '/Applications/GoLand.app/Contents/MacOS/goland',
+ '/Applications/Rider.app/Contents/MacOS/rider': '/Applications/Rider.app/Contents/MacOS/rider',
+ '/Applications/Cursor.app/Contents/MacOS/Cursor': '/Applications/Cursor.app/Contents/MacOS/Cursor'
+};
+const COMMON_EDITORS_LINUX = {
+ atom: 'atom',
+ Brackets: 'brackets',
+ code: 'code',
+ 'code-insiders': 'code-insiders',
+ vscodium: 'vscodium',
+ emacs: 'emacs',
+ gvim: 'gvim',
+ 'idea.sh': 'idea',
+ 'phpstorm.sh': 'phpstorm',
+ 'pycharm.sh': 'pycharm',
+ 'rubymine.sh': 'rubymine',
+ sublime_text: 'sublime_text',
+ vim: 'vim',
+ nvim: 'nvim',
+ 'webstorm.sh': 'webstorm',
+ 'goland.sh': 'goland',
+ 'rider.sh': 'rider'
+};
+const COMMON_EDITORS_WIN = [
+ 'Brackets.exe',
+ 'Code.exe',
+ 'Code - Insiders.exe',
+ 'VSCodium.exe',
+ 'atom.exe',
+ 'sublime_text.exe',
+ 'notepad++.exe',
+ 'clion.exe',
+ 'clion64.exe',
+ 'idea.exe',
+ 'idea64.exe',
+ 'phpstorm.exe',
+ 'phpstorm64.exe',
+ 'pycharm.exe',
+ 'pycharm64.exe',
+ 'rubymine.exe',
+ 'rubymine64.exe',
+ 'webstorm.exe',
+ 'webstorm64.exe',
+ 'goland.exe',
+ 'goland64.exe',
+ 'rider.exe',
+ 'rider64.exe'
+];
+// Transpiled version of: /^([A-Za-z]:[/\\])?[\p{L}0-9/.\-_\\]+$/u
+// Non-transpiled version requires support for Unicode property regex. Allows
+// alphanumeric characters, periods, dashes, slashes, and underscores.
+const WINDOWS_FILE_NAME_ACCESS_LIST = /^([A-Za-z]:[/\\])?(?:[\x2D-9A-Z\\_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\u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\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])+$/;
+function getArgumentsForLineNumber(editor, fileName, line1, column1) {
+ const editorBasename = path.basename(editor).replace(/\.(exe|cmd|bat)$/i, '');
+ switch(editorBasename){
+ case 'atom':
+ case 'Atom':
+ case 'Atom Beta':
+ case 'subl':
+ case 'sublime':
+ case 'sublime_text':
+ {
+ return [
+ fileName + ':' + line1 + ':' + column1
+ ];
+ }
+ case 'wstorm':
+ case 'charm':
+ {
+ return [
+ fileName + ':' + line1
+ ];
+ }
+ case 'notepad++':
+ {
+ return [
+ '-n' + line1,
+ '-c' + column1,
+ fileName
+ ];
+ }
+ case 'vim':
+ case 'nvim':
+ case 'mvim':
+ case 'joe':
+ case 'gvim':
+ {
+ return [
+ '+' + line1,
+ fileName
+ ];
+ }
+ case 'emacs':
+ case 'emacsclient':
+ {
+ return [
+ '+' + line1 + ':' + column1,
+ fileName
+ ];
+ }
+ case 'rmate':
+ case 'mate':
+ case 'mine':
+ {
+ return [
+ '--line',
+ line1.toString(),
+ fileName
+ ];
+ }
+ case 'code':
+ case 'Code':
+ case 'Cursor':
+ case 'code-insiders':
+ case 'Code - Insiders':
+ case 'vscodium':
+ case 'VSCodium':
+ {
+ return [
+ '-g',
+ fileName + ':' + line1 + ':' + column1
+ ];
+ }
+ case 'appcode':
+ case 'clion':
+ case 'clion64':
+ case 'idea':
+ case 'idea64':
+ case 'phpstorm':
+ case 'phpstorm64':
+ case 'pycharm':
+ case 'pycharm64':
+ case 'rubymine':
+ case 'rubymine64':
+ case 'webstorm':
+ case 'webstorm64':
+ case 'goland':
+ case 'goland64':
+ case 'rider':
+ case 'rider64':
+ {
+ return [
+ '--line',
+ line1.toString(),
+ fileName
+ ];
+ }
+ default:
+ {
+ // For all others, drop the lineNumber until we have
+ // a mapping above, since providing the lineNumber incorrectly
+ // can result in errors or confusing behavior.
+ return [
+ fileName
+ ];
+ }
+ }
+}
+function guessEditor() {
+ // Explicit config always wins
+ if (process.env.REACT_EDITOR) {
+ return shellQuote.parse(process.env.REACT_EDITOR);
+ }
+ // We can find out which editor is currently running by:
+ // `ps x` on macOS and Linux
+ // `Get-Process` on Windows
+ try {
+ if (process.platform === 'darwin') {
+ const output = child_process.execSync('ps x').toString();
+ const processNames = Object.keys(COMMON_EDITORS_MACOS);
+ for(let i = 0; i < processNames.length; i++){
+ const processName = processNames[i];
+ if (output.indexOf(processName) !== -1) {
+ return [
+ COMMON_EDITORS_MACOS[processName]
+ ];
+ }
+ }
+ } else if (process.platform === 'win32') {
+ // Some processes need elevated rights to get its executable path.
+ // Just filter them out upfront. This also saves 10-20ms on the command.
+ const output = child_process.execSync('wmic process where "executablepath is not null" get executablepath').toString();
+ const runningProcesses = output.split('\r\n');
+ for(let i = 0; i < runningProcesses.length; i++){
+ const processPath = runningProcesses[i].trim();
+ const processName = path.basename(processPath);
+ if (COMMON_EDITORS_WIN.indexOf(processName) !== -1) {
+ return [
+ processPath
+ ];
+ }
+ }
+ } else if (process.platform === 'linux') {
+ // --no-heading No header line
+ // x List all processes owned by you
+ // -o comm Need only names column
+ const output = child_process.execSync('ps x --no-heading -o comm --sort=comm').toString();
+ const processNames = Object.keys(COMMON_EDITORS_LINUX);
+ for(let i = 0; i < processNames.length; i++){
+ const processName = processNames[i];
+ if (output.indexOf(processName) !== -1) {
+ return [
+ COMMON_EDITORS_LINUX[processName]
+ ];
+ }
+ }
+ }
+ } catch (error) {
+ // Ignore...
+ }
+ // Last resort, use old skool env vars
+ if (process.env.VISUAL) {
+ return [
+ process.env.VISUAL
+ ];
+ } else if (process.env.EDITOR) {
+ return [
+ process.env.EDITOR
+ ];
+ }
+ return [];
+}
+function printInstructions(fileName, errorMessage) {
+ console.log();
+ console.log(red('Could not open ' + path.basename(fileName) + ' in the editor.'));
+ if (errorMessage) {
+ if (errorMessage[errorMessage.length - 1] !== '.') {
+ errorMessage += '.';
+ }
+ console.log(red('The editor process exited with an error: ' + errorMessage));
+ }
+ console.log();
+ console.log('To set up the editor integration, add something like ' + cyan('REACT_EDITOR=atom') + ' to the ' + green('.env.local') + ' file in your project folder ' + 'and restart the development server.');
+ console.log();
+}
+export function escapeApplescriptStringFragment(input) {
+ // The only two special characters in a quoted applescript string are
+ // backslash and double quote. Both are escaped with a preceeding backslash.
+ //
+ // Some whitespace characters (like newlines) can be escaped (as `\n`), but
+ // aren't required to be escaped (so we're not bothering to do that).
+ //
+ // https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_classes.html#//apple_ref/doc/uid/TP40000983-CH1g-BBCIAHJF:~:text=Special%20String%20Characters
+ return input.replaceAll(/[\\"]/g, (original)=>`\\${original}`);
+}
+export function launchEditor(fileName, line1, column1) {
+ if (!fs.existsSync(fileName)) {
+ return;
+ }
+ // Sanitize lineNumber to prevent malicious use on win32
+ // via: https://github.com/nodejs/node/blob/c3bb4b1aa5e907d489619fb43d233c3336bfc03d/lib/child_process.js#L333
+ // and it should be a positive integer
+ if (!(Number.isInteger(line1) && line1 > 0)) {
+ return;
+ }
+ // colNumber is optional, but should be a positive integer too
+ // default is 1
+ if (!(Number.isInteger(column1) && column1 > 0)) {
+ column1 = 1;
+ }
+ let [editor, ...args] = guessEditor();
+ if (!editor) {
+ printInstructions(fileName, null);
+ return;
+ }
+ if (editor.toLowerCase() === 'none') {
+ return;
+ }
+ if (process.platform === 'linux' && fileName.startsWith('/mnt/') && /Microsoft/i.test(os.release())) {
+ // Assume WSL / "Bash on Ubuntu on Windows" is being used, and
+ // that the file exists on the Windows file system.
+ // `os.release()` is "4.4.0-43-Microsoft" in the current release
+ // build of WSL, see: https://github.com/Microsoft/BashOnWindows/issues/423#issuecomment-221627364
+ // When a Windows editor is specified, interop functionality can
+ // handle the path translation, but only if a relative path is used.
+ fileName = path.relative('', fileName);
+ }
+ // cmd.exe on Windows is vulnerable to RCE attacks given a file name of the
+ // form "C:\Users\myusername\Downloads\& curl 172.21.93.52". Use an access list
+ // to validate user-provided file names. This doesn't cover the entire range
+ // of valid file names but should cover almost all of them in practice.
+ if (process.platform === 'win32' && !WINDOWS_FILE_NAME_ACCESS_LIST.test(fileName.trim())) {
+ console.log();
+ console.log(red('Could not open ' + path.basename(fileName) + ' in the editor.'));
+ console.log();
+ console.log('When running on Windows, file names are checked against an access list ' + 'to protect against remote code execution attacks. File names may ' + 'consist only of alphanumeric characters (all languages), periods, ' + 'dashes, slashes, and underscores.');
+ console.log();
+ return;
+ }
+ if (line1) {
+ args = args.concat(getArgumentsForLineNumber(editor, fileName, line1, column1));
+ } else {
+ args.push(fileName);
+ }
+ let p = undefined;
+ if (process.platform === 'win32') {
+ // On Windows, launch the editor in a shell because spawn can only
+ // launch .exe files.
+ p = child_process.spawn('cmd.exe', [
+ '/C',
+ editor
+ ].concat(args), {
+ stdio: 'inherit',
+ detached: true
+ });
+ } else if (isTerminalEditor(editor)) {
+ if (process.platform === 'darwin') {
+ const escapedScript = escapeApplescriptStringFragment(shellQuote.quote([
+ editor,
+ ...args
+ ]));
+ p = child_process.spawn('osascript', [
+ '-e',
+ `tell application "Terminal" to do script "${escapedScript}"`
+ ], {
+ stdio: 'ignore'
+ });
+ } else {
+ printInstructions(fileName, 'Terminal editors can only be used on macOS.');
+ }
+ } else {
+ p = child_process.spawn(editor, args, {
+ stdio: 'inherit'
+ });
+ }
+ if (p) {
+ p.on('exit', function(errorCode) {
+ if (errorCode) {
+ printInstructions(fileName, '(code ' + errorCode + ')');
+ }
+ });
+ p.on('error', function(error) {
+ printInstructions(fileName, error.message);
+ });
+ }
+}
+/**
+ * Open the file in editor if exists, otherwise return an error
+ * @param file `file:` URL, or absolute path or relative path. Relative paths must
+ * relative to `nextRootDirectory`.
+ */ export async function openFileInEditor(file, line1, column1, nextRootDirectory) {
+ let filePath;
+ if (file.startsWith('file://')) {
+ try {
+ filePath = fileURLToPath(file);
+ } catch (error) {
+ return {
+ found: false,
+ error
+ };
+ }
+ } else if (path.isAbsolute(file)) {
+ filePath = file;
+ } else {
+ filePath = path.join(nextRootDirectory, file);
+ }
+ const result = {
+ found: false,
+ error: null
+ };
+ const existed = await fsp.access(filePath, fs.constants.F_OK).then(()=>true, ()=>false);
+ if (existed) {
+ try {
+ launchEditor(filePath, line1, column1);
+ result.found = true;
+ } catch (err) {
+ result.error = err;
+ }
+ }
+ return result;
+}
+
+//# sourceMappingURL=launch-editor.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/launch-editor.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/launch-editor.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..f6404a2849860f75622d867cdd93365f7fe33f23
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/launch-editor.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/server/launch-editor.ts"],"sourcesContent":["/**\n * MIT License\n *\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport { cyan, green, red } from '../../lib/picocolors'\nimport child_process from 'child_process'\nimport fs from 'fs'\nimport fsp from 'fs/promises'\nimport os from 'os'\nimport path from 'path'\nimport { fileURLToPath } from 'url'\nimport shellQuote from 'next/dist/compiled/shell-quote'\n\nfunction isTerminalEditor(editor: string) {\n switch (editor) {\n case 'vi':\n case 'vim':\n case 'nvim':\n case 'emacs':\n case 'nano': {\n return true\n }\n default: {\n }\n }\n return false\n}\n\n// Map from full process name to binary that starts the process\n// We can't just re-use full process name, because it will spawn a new instance\n// of the app every time\nconst COMMON_EDITORS_MACOS = {\n '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',\n '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta':\n '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',\n '/Applications/Brackets.app/Contents/MacOS/Brackets': 'brackets',\n '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text':\n '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',\n '/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text':\n '/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl',\n '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2':\n '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',\n '/Applications/Visual Studio Code.app/Contents/MacOS/Electron':\n '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code',\n '/Applications/Visual Studio Code.app/Contents/MacOS/Code':\n '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code',\n '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron':\n '/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code',\n '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders':\n '/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code',\n '/Applications/VSCodium.app/Contents/MacOS/Electron':\n '/Applications/VSCodium.app/Contents/Resources/app/bin/code',\n '/Applications/AppCode.app/Contents/MacOS/appcode':\n '/Applications/AppCode.app/Contents/MacOS/appcode',\n '/Applications/CLion.app/Contents/MacOS/clion':\n '/Applications/CLion.app/Contents/MacOS/clion',\n '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea':\n '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',\n '/Applications/PhpStorm.app/Contents/MacOS/phpstorm':\n '/Applications/PhpStorm.app/Contents/MacOS/phpstorm',\n '/Applications/PyCharm.app/Contents/MacOS/pycharm':\n '/Applications/PyCharm.app/Contents/MacOS/pycharm',\n '/Applications/PyCharm CE.app/Contents/MacOS/pycharm':\n '/Applications/PyCharm CE.app/Contents/MacOS/pycharm',\n '/Applications/RubyMine.app/Contents/MacOS/rubymine':\n '/Applications/RubyMine.app/Contents/MacOS/rubymine',\n '/Applications/WebStorm.app/Contents/MacOS/webstorm':\n '/Applications/WebStorm.app/Contents/MacOS/webstorm',\n '/Applications/MacVim.app/Contents/MacOS/MacVim': 'mvim',\n '/Applications/GoLand.app/Contents/MacOS/goland':\n '/Applications/GoLand.app/Contents/MacOS/goland',\n '/Applications/Rider.app/Contents/MacOS/rider':\n '/Applications/Rider.app/Contents/MacOS/rider',\n '/Applications/Cursor.app/Contents/MacOS/Cursor':\n '/Applications/Cursor.app/Contents/MacOS/Cursor',\n}\n\nconst COMMON_EDITORS_LINUX = {\n atom: 'atom',\n Brackets: 'brackets',\n code: 'code',\n 'code-insiders': 'code-insiders',\n vscodium: 'vscodium',\n emacs: 'emacs',\n gvim: 'gvim',\n 'idea.sh': 'idea',\n 'phpstorm.sh': 'phpstorm',\n 'pycharm.sh': 'pycharm',\n 'rubymine.sh': 'rubymine',\n sublime_text: 'sublime_text',\n vim: 'vim',\n nvim: 'nvim',\n 'webstorm.sh': 'webstorm',\n 'goland.sh': 'goland',\n 'rider.sh': 'rider',\n}\n\nconst COMMON_EDITORS_WIN = [\n 'Brackets.exe',\n 'Code.exe',\n 'Code - Insiders.exe',\n 'VSCodium.exe',\n 'atom.exe',\n 'sublime_text.exe',\n 'notepad++.exe',\n 'clion.exe',\n 'clion64.exe',\n 'idea.exe',\n 'idea64.exe',\n 'phpstorm.exe',\n 'phpstorm64.exe',\n 'pycharm.exe',\n 'pycharm64.exe',\n 'rubymine.exe',\n 'rubymine64.exe',\n 'webstorm.exe',\n 'webstorm64.exe',\n 'goland.exe',\n 'goland64.exe',\n 'rider.exe',\n 'rider64.exe',\n]\n\n// Transpiled version of: /^([A-Za-z]:[/\\\\])?[\\p{L}0-9/.\\-_\\\\]+$/u\n// Non-transpiled version requires support for Unicode property regex. Allows\n// alphanumeric characters, periods, dashes, slashes, and underscores.\nconst WINDOWS_FILE_NAME_ACCESS_LIST =\n /^([A-Za-z]:[/\\\\])?(?:[\\x2D-9A-Z\\\\_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0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10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEF\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7B9\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-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\\uDEF2]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFF1]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D])+$/\n\nfunction getArgumentsForLineNumber(\n editor: string,\n fileName: string,\n line1: number,\n column1: number\n): string[] {\n const editorBasename = path.basename(editor).replace(/\\.(exe|cmd|bat)$/i, '')\n switch (editorBasename) {\n case 'atom':\n case 'Atom':\n case 'Atom Beta':\n case 'subl':\n case 'sublime':\n case 'sublime_text': {\n return [fileName + ':' + line1 + ':' + column1]\n }\n case 'wstorm':\n case 'charm': {\n return [fileName + ':' + line1]\n }\n case 'notepad++': {\n return ['-n' + line1, '-c' + column1, fileName]\n }\n case 'vim':\n case 'nvim':\n case 'mvim':\n case 'joe':\n case 'gvim': {\n return ['+' + line1, fileName]\n }\n case 'emacs':\n case 'emacsclient': {\n return ['+' + line1 + ':' + column1, fileName]\n }\n case 'rmate':\n case 'mate':\n case 'mine': {\n return ['--line', line1.toString(), fileName]\n }\n case 'code':\n case 'Code':\n case 'Cursor':\n case 'code-insiders':\n case 'Code - Insiders':\n case 'vscodium':\n case 'VSCodium': {\n return ['-g', fileName + ':' + line1 + ':' + column1]\n }\n case 'appcode':\n case 'clion':\n case 'clion64':\n case 'idea':\n case 'idea64':\n case 'phpstorm':\n case 'phpstorm64':\n case 'pycharm':\n case 'pycharm64':\n case 'rubymine':\n case 'rubymine64':\n case 'webstorm':\n case 'webstorm64':\n case 'goland':\n case 'goland64':\n case 'rider':\n case 'rider64': {\n return ['--line', line1.toString(), fileName]\n }\n default: {\n // For all others, drop the lineNumber until we have\n // a mapping above, since providing the lineNumber incorrectly\n // can result in errors or confusing behavior.\n return [fileName]\n }\n }\n}\n\nfunction guessEditor(): string[] {\n // Explicit config always wins\n if (process.env.REACT_EDITOR) {\n return shellQuote.parse(process.env.REACT_EDITOR) as any\n }\n\n // We can find out which editor is currently running by:\n // `ps x` on macOS and Linux\n // `Get-Process` on Windows\n try {\n if (process.platform === 'darwin') {\n const output = child_process.execSync('ps x').toString()\n const processNames = Object.keys(COMMON_EDITORS_MACOS)\n for (let i = 0; i < processNames.length; i++) {\n const processName = processNames[i]\n if (output.indexOf(processName) !== -1) {\n return [(COMMON_EDITORS_MACOS as any)[processName]]\n }\n }\n } else if (process.platform === 'win32') {\n // Some processes need elevated rights to get its executable path.\n // Just filter them out upfront. This also saves 10-20ms on the command.\n const output = child_process\n .execSync(\n 'wmic process where \"executablepath is not null\" get executablepath'\n )\n .toString()\n const runningProcesses = output.split('\\r\\n')\n for (let i = 0; i < runningProcesses.length; i++) {\n const processPath = runningProcesses[i].trim()\n const processName = path.basename(processPath)\n if (COMMON_EDITORS_WIN.indexOf(processName) !== -1) {\n return [processPath]\n }\n }\n } else if (process.platform === 'linux') {\n // --no-heading No header line\n // x List all processes owned by you\n // -o comm Need only names column\n const output = child_process\n .execSync('ps x --no-heading -o comm --sort=comm')\n .toString()\n const processNames = Object.keys(COMMON_EDITORS_LINUX)\n for (let i = 0; i < processNames.length; i++) {\n const processName = processNames[i]\n if (output.indexOf(processName) !== -1) {\n return [(COMMON_EDITORS_LINUX as any)[processName] as string]\n }\n }\n }\n } catch (error) {\n // Ignore...\n }\n\n // Last resort, use old skool env vars\n if (process.env.VISUAL) {\n return [process.env.VISUAL]\n } else if (process.env.EDITOR) {\n return [process.env.EDITOR]\n }\n\n return []\n}\n\nfunction printInstructions(fileName: string, errorMessage: string | null) {\n console.log()\n console.log(\n red('Could not open ' + path.basename(fileName) + ' in the editor.')\n )\n if (errorMessage) {\n if (errorMessage[errorMessage.length - 1] !== '.') {\n errorMessage += '.'\n }\n console.log(red('The editor process exited with an error: ' + errorMessage))\n }\n console.log()\n console.log(\n 'To set up the editor integration, add something like ' +\n cyan('REACT_EDITOR=atom') +\n ' to the ' +\n green('.env.local') +\n ' file in your project folder ' +\n 'and restart the development server.'\n )\n console.log()\n}\n\nexport function escapeApplescriptStringFragment(input: string): string {\n // The only two special characters in a quoted applescript string are\n // backslash and double quote. Both are escaped with a preceeding backslash.\n //\n // Some whitespace characters (like newlines) can be escaped (as `\\n`), but\n // aren't required to be escaped (so we're not bothering to do that).\n //\n // https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_classes.html#//apple_ref/doc/uid/TP40000983-CH1g-BBCIAHJF:~:text=Special%20String%20Characters\n return input.replaceAll(/[\\\\\"]/g, (original) => `\\\\${original}`)\n}\n\nexport function launchEditor(fileName: string, line1: number, column1: number) {\n if (!fs.existsSync(fileName)) {\n return\n }\n\n // Sanitize lineNumber to prevent malicious use on win32\n // via: https://github.com/nodejs/node/blob/c3bb4b1aa5e907d489619fb43d233c3336bfc03d/lib/child_process.js#L333\n // and it should be a positive integer\n if (!(Number.isInteger(line1) && line1 > 0)) {\n return\n }\n\n // colNumber is optional, but should be a positive integer too\n // default is 1\n if (!(Number.isInteger(column1) && column1 > 0)) {\n column1 = 1\n }\n\n let [editor, ...args] = guessEditor()\n\n if (!editor) {\n printInstructions(fileName, null)\n return\n }\n\n if (editor.toLowerCase() === 'none') {\n return\n }\n\n if (\n process.platform === 'linux' &&\n fileName.startsWith('/mnt/') &&\n /Microsoft/i.test(os.release())\n ) {\n // Assume WSL / \"Bash on Ubuntu on Windows\" is being used, and\n // that the file exists on the Windows file system.\n // `os.release()` is \"4.4.0-43-Microsoft\" in the current release\n // build of WSL, see: https://github.com/Microsoft/BashOnWindows/issues/423#issuecomment-221627364\n // When a Windows editor is specified, interop functionality can\n // handle the path translation, but only if a relative path is used.\n fileName = path.relative('', fileName)\n }\n\n // cmd.exe on Windows is vulnerable to RCE attacks given a file name of the\n // form \"C:\\Users\\myusername\\Downloads\\& curl 172.21.93.52\". Use an access list\n // to validate user-provided file names. This doesn't cover the entire range\n // of valid file names but should cover almost all of them in practice.\n if (\n process.platform === 'win32' &&\n !WINDOWS_FILE_NAME_ACCESS_LIST.test(fileName.trim())\n ) {\n console.log()\n console.log(\n red('Could not open ' + path.basename(fileName) + ' in the editor.')\n )\n console.log()\n console.log(\n 'When running on Windows, file names are checked against an access list ' +\n 'to protect against remote code execution attacks. File names may ' +\n 'consist only of alphanumeric characters (all languages), periods, ' +\n 'dashes, slashes, and underscores.'\n )\n console.log()\n return\n }\n\n if (line1) {\n args = args.concat(\n getArgumentsForLineNumber(editor, fileName, line1, column1)\n )\n } else {\n args.push(fileName)\n }\n\n let p: child_process.ChildProcess | undefined = undefined\n if (process.platform === 'win32') {\n // On Windows, launch the editor in a shell because spawn can only\n // launch .exe files.\n p = child_process.spawn('cmd.exe', ['/C', editor].concat(args), {\n stdio: 'inherit',\n detached: true,\n })\n } else if (isTerminalEditor(editor)) {\n if (process.platform === 'darwin') {\n const escapedScript = escapeApplescriptStringFragment(\n shellQuote.quote([editor, ...args])\n )\n p = child_process.spawn(\n 'osascript',\n ['-e', `tell application \"Terminal\" to do script \"${escapedScript}\"`],\n { stdio: 'ignore' }\n )\n } else {\n printInstructions(fileName, 'Terminal editors can only be used on macOS.')\n }\n } else {\n p = child_process.spawn(editor, args, { stdio: 'inherit' })\n }\n\n if (p) {\n p.on('exit', function (errorCode) {\n if (errorCode) {\n printInstructions(fileName, '(code ' + errorCode + ')')\n }\n })\n p.on('error', function (error) {\n printInstructions(fileName, error.message)\n })\n }\n}\n\n/**\n * Open the file in editor if exists, otherwise return an error\n * @param file `file:` URL, or absolute path or relative path. Relative paths must\n * relative to `nextRootDirectory`.\n */\nexport async function openFileInEditor(\n file: string,\n line1: number,\n column1: number,\n nextRootDirectory: string\n): Promise<{ found: boolean; error: unknown | null }> {\n let filePath: string\n if (file.startsWith('file://')) {\n try {\n filePath = fileURLToPath(file)\n } catch (error) {\n return { found: false, error }\n }\n } else if (path.isAbsolute(file)) {\n filePath = file\n } else {\n filePath = path.join(nextRootDirectory, file)\n }\n\n const result = {\n found: false,\n error: null as unknown | null,\n }\n const existed = await fsp.access(filePath, fs.constants.F_OK).then(\n () => true,\n () => false\n )\n if (existed) {\n try {\n launchEditor(filePath, line1, column1)\n result.found = true\n } catch (err) {\n result.error = err\n }\n }\n return result\n}\n"],"names":["cyan","green","red","child_process","fs","fsp","os","path","fileURLToPath","shellQuote","isTerminalEditor","editor","COMMON_EDITORS_MACOS","COMMON_EDITORS_LINUX","atom","Brackets","code","vscodium","emacs","gvim","sublime_text","vim","nvim","COMMON_EDITORS_WIN","WINDOWS_FILE_NAME_ACCESS_LIST","getArgumentsForLineNumber","fileName","line1","column1","editorBasename","basename","replace","toString","guessEditor","process","env","REACT_EDITOR","parse","platform","output","execSync","processNames","Object","keys","i","length","processName","indexOf","runningProcesses","split","processPath","trim","error","VISUAL","EDITOR","printInstructions","errorMessage","console","log","escapeApplescriptStringFragment","input","replaceAll","original","launchEditor","existsSync","Number","isInteger","args","toLowerCase","startsWith","test","release","relative","concat","push","p","undefined","spawn","stdio","detached","escapedScript","quote","on","errorCode","message","openFileInEditor","file","nextRootDirectory","filePath","found","isAbsolute","join","result","existed","access","constants","F_OK","then","err"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;CAsBC,GACD,SAASA,IAAI,EAAEC,KAAK,EAAEC,GAAG,QAAQ,uBAAsB;AACvD,OAAOC,mBAAmB,gBAAe;AACzC,OAAOC,QAAQ,KAAI;AACnB,OAAOC,SAAS,cAAa;AAC7B,OAAOC,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AACvB,SAASC,aAAa,QAAQ,MAAK;AACnC,OAAOC,gBAAgB,iCAAgC;AAEvD,SAASC,iBAAiBC,MAAc;IACtC,OAAQA;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YAAQ;gBACX,OAAO;YACT;QACA;YAAS,CACT;IACF;IACA,OAAO;AACT;AAEA,+DAA+D;AAC/D,+EAA+E;AAC/E,wBAAwB;AACxB,MAAMC,uBAAuB;IAC3B,8CAA8C;IAC9C,wDACE;IACF,sDAAsD;IACtD,8DACE;IACF,kEACE;IACF,kEACE;IACF,gEACE;IACF,4DACE;IACF,2EACE;IACF,kFACE;IACF,sDACE;IACF,oDACE;IACF,gDACE;IACF,uDACE;IACF,sDACE;IACF,oDACE;IACF,uDACE;IACF,sDACE;IACF,sDACE;IACF,kDAAkD;IAClD,kDACE;IACF,gDACE;IACF,kDACE;AACJ;AAEA,MAAMC,uBAAuB;IAC3BC,MAAM;IACNC,UAAU;IACVC,MAAM;IACN,iBAAiB;IACjBC,UAAU;IACVC,OAAO;IACPC,MAAM;IACN,WAAW;IACX,eAAe;IACf,cAAc;IACd,eAAe;IACfC,cAAc;IACdC,KAAK;IACLC,MAAM;IACN,eAAe;IACf,aAAa;IACb,YAAY;AACd;AAEA,MAAMC,qBAAqB;IACzB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,kEAAkE;AAClE,6EAA6E;AAC7E,sEAAsE;AACtE,MAAMC,gCACJ;AAEF,SAASC,0BACPd,MAAc,EACde,QAAgB,EAChBC,KAAa,EACbC,OAAe;IAEf,MAAMC,iBAAiBtB,KAAKuB,QAAQ,CAACnB,QAAQoB,OAAO,CAAC,qBAAqB;IAC1E,OAAQF;QACN,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;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,KAAK;YACZN,OAAOxC,KAAK,GAAG8C;QACjB;IACF;IACA,OAAON;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/middleware-response.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/middleware-response.js
new file mode 100644
index 0000000000000000000000000000000000000000..4418764e2d7b0aa0e16af7fcb48a6e675635d734
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/middleware-response.js
@@ -0,0 +1,39 @@
+import { inspect } from 'util';
+export const middlewareResponse = {
+ noContent (res) {
+ res.statusCode = 204;
+ res.end('No Content');
+ },
+ badRequest (res, reason) {
+ res.statusCode = 400;
+ if (reason !== undefined) {
+ res.setHeader('Content-Type', 'text/plain');
+ res.end(reason);
+ } else {
+ res.end();
+ }
+ },
+ notFound (res) {
+ res.statusCode = 404;
+ res.end('Not Found');
+ },
+ methodNotAllowed (res) {
+ res.statusCode = 405;
+ res.end('Method Not Allowed');
+ },
+ internalServerError (res, error) {
+ res.statusCode = 500;
+ res.setHeader('Content-Type', 'text/plain');
+ res.end(error !== undefined ? inspect(error, {
+ colors: false
+ }) : 'Internal Server Error');
+ },
+ json (res, data) {
+ res.setHeader('Content-Type', 'application/json').end(Buffer.from(JSON.stringify(data)));
+ },
+ jsonString (res, data) {
+ res.setHeader('Content-Type', 'application/json').end(Buffer.from(data));
+ }
+};
+
+//# sourceMappingURL=middleware-response.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/middleware-response.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/middleware-response.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..7f1efab7c50e9b48d17ce7c711692849a8e6fa0c
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/middleware-response.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/server/middleware-response.ts"],"sourcesContent":["import type { ServerResponse } from 'http'\nimport { inspect } from 'util'\n\nexport const middlewareResponse = {\n noContent(res: ServerResponse) {\n res.statusCode = 204\n res.end('No Content')\n },\n badRequest(res: ServerResponse, reason?: string) {\n res.statusCode = 400\n if (reason !== undefined) {\n res.setHeader('Content-Type', 'text/plain')\n res.end(reason)\n } else {\n res.end()\n }\n },\n notFound(res: ServerResponse) {\n res.statusCode = 404\n res.end('Not Found')\n },\n methodNotAllowed(res: ServerResponse) {\n res.statusCode = 405\n res.end('Method Not Allowed')\n },\n internalServerError(res: ServerResponse, error?: unknown) {\n res.statusCode = 500\n res.setHeader('Content-Type', 'text/plain')\n res.end(\n error !== undefined\n ? inspect(error, { colors: false })\n : 'Internal Server Error'\n )\n },\n json(res: ServerResponse, data: any) {\n res\n .setHeader('Content-Type', 'application/json')\n .end(Buffer.from(JSON.stringify(data)))\n },\n jsonString(res: ServerResponse, data: string) {\n res.setHeader('Content-Type', 'application/json').end(Buffer.from(data))\n },\n}\n"],"names":["inspect","middlewareResponse","noContent","res","statusCode","end","badRequest","reason","undefined","setHeader","notFound","methodNotAllowed","internalServerError","error","colors","json","data","Buffer","from","JSON","stringify","jsonString"],"mappings":"AACA,SAASA,OAAO,QAAQ,OAAM;AAE9B,OAAO,MAAMC,qBAAqB;IAChCC,WAAUC,GAAmB;QAC3BA,IAAIC,UAAU,GAAG;QACjBD,IAAIE,GAAG,CAAC;IACV;IACAC,YAAWH,GAAmB,EAAEI,MAAe;QAC7CJ,IAAIC,UAAU,GAAG;QACjB,IAAIG,WAAWC,WAAW;YACxBL,IAAIM,SAAS,CAAC,gBAAgB;YAC9BN,IAAIE,GAAG,CAACE;QACV,OAAO;YACLJ,IAAIE,GAAG;QACT;IACF;IACAK,UAASP,GAAmB;QAC1BA,IAAIC,UAAU,GAAG;QACjBD,IAAIE,GAAG,CAAC;IACV;IACAM,kBAAiBR,GAAmB;QAClCA,IAAIC,UAAU,GAAG;QACjBD,IAAIE,GAAG,CAAC;IACV;IACAO,qBAAoBT,GAAmB,EAAEU,KAAe;QACtDV,IAAIC,UAAU,GAAG;QACjBD,IAAIM,SAAS,CAAC,gBAAgB;QAC9BN,IAAIE,GAAG,CACLQ,UAAUL,YACNR,QAAQa,OAAO;YAAEC,QAAQ;QAAM,KAC/B;IAER;IACAC,MAAKZ,GAAmB,EAAEa,IAAS;QACjCb,IACGM,SAAS,CAAC,gBAAgB,oBAC1BJ,GAAG,CAACY,OAAOC,IAAI,CAACC,KAAKC,SAAS,CAACJ;IACpC;IACAK,YAAWlB,GAAmB,EAAEa,IAAY;QAC1Cb,IAAIM,SAAS,CAAC,gBAAgB,oBAAoBJ,GAAG,CAACY,OAAOC,IAAI,CAACF;IACpE;AACF,EAAC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/restart-dev-server-middleware.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/restart-dev-server-middleware.js
new file mode 100644
index 0000000000000000000000000000000000000000..4c3b04292b55a40cf107ff4826b3a0e75bd00c99
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/restart-dev-server-middleware.js
@@ -0,0 +1,62 @@
+import { RESTART_EXIT_CODE } from '../../server/lib/utils';
+import { middlewareResponse } from './middleware-response';
+import { invalidateFileSystemCache as invalidateWebpackFileSystemCache } from '../../build/webpack/cache-invalidation';
+const EVENT_DEV_OVERLAY_RESTART_SERVER = 'DEV_OVERLAY_RESTART_SERVER';
+export function getRestartDevServerMiddleware({ telemetry, turbopackProject, webpackCacheDirectories }) {
+ /**
+ * Some random value between 1 and Number.MAX_SAFE_INTEGER (inclusive). The same value is returned
+ * on every call to `__nextjs_server_status` until the server is restarted.
+ *
+ * Can be used to determine if two server status responses are from the same process or a
+ * different (restarted) process.
+ */ const executionId = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1;
+ async function handleRestartRequest(req, res, searchParams) {
+ if (req.method !== 'POST') {
+ return middlewareResponse.methodNotAllowed(res);
+ }
+ const shouldInvalidateFileSystemCache = searchParams.has('invalidateFileSystemCache');
+ if (shouldInvalidateFileSystemCache) {
+ if (webpackCacheDirectories != null) {
+ await Promise.all(Array.from(webpackCacheDirectories).map(invalidateWebpackFileSystemCache));
+ }
+ if (turbopackProject != null) {
+ await turbopackProject.invalidateFileSystemCache();
+ }
+ }
+ telemetry.record({
+ eventName: EVENT_DEV_OVERLAY_RESTART_SERVER,
+ payload: {
+ invalidateFileSystemCache: shouldInvalidateFileSystemCache
+ }
+ });
+ // TODO: Use flushDetached
+ await telemetry.flush();
+ // do this async to try to give the response a chance to send
+ // it's not really important if it doesn't though
+ setTimeout(()=>{
+ process.exit(RESTART_EXIT_CODE);
+ }, 0);
+ return middlewareResponse.noContent(res);
+ }
+ async function handleServerStatus(req, res) {
+ if (req.method !== 'GET') {
+ return middlewareResponse.methodNotAllowed(res);
+ }
+ return middlewareResponse.json(res, {
+ executionId
+ });
+ }
+ return async function(req, res, next) {
+ const { pathname, searchParams } = new URL(`http://n${req.url}`);
+ switch(pathname){
+ case '/__nextjs_restart_dev':
+ return await handleRestartRequest(req, res, searchParams);
+ case '/__nextjs_server_status':
+ return await handleServerStatus(req, res);
+ default:
+ return next();
+ }
+ };
+}
+
+//# sourceMappingURL=restart-dev-server-middleware.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/restart-dev-server-middleware.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/restart-dev-server-middleware.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..b6f324caa9fe33eae4a944ccc3e095e92385961c
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/restart-dev-server-middleware.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/server/restart-dev-server-middleware.ts"],"sourcesContent":["import type { ServerResponse, IncomingMessage } from 'http'\nimport type { Telemetry } from '../../telemetry/storage'\nimport { RESTART_EXIT_CODE } from '../../server/lib/utils'\nimport { middlewareResponse } from './middleware-response'\nimport type { Project } from '../../build/swc/types'\nimport { invalidateFileSystemCache as invalidateWebpackFileSystemCache } from '../../build/webpack/cache-invalidation'\n\nconst EVENT_DEV_OVERLAY_RESTART_SERVER = 'DEV_OVERLAY_RESTART_SERVER'\n\ninterface RestartDevServerMiddlewareConfig {\n telemetry: Telemetry\n turbopackProject?: Project\n webpackCacheDirectories?: Set\n}\n\nexport function getRestartDevServerMiddleware({\n telemetry,\n turbopackProject,\n webpackCacheDirectories,\n}: RestartDevServerMiddlewareConfig) {\n /**\n * Some random value between 1 and Number.MAX_SAFE_INTEGER (inclusive). The same value is returned\n * on every call to `__nextjs_server_status` until the server is restarted.\n *\n * Can be used to determine if two server status responses are from the same process or a\n * different (restarted) process.\n */\n const executionId: number =\n Math.floor(Math.random() * Number.MAX_SAFE_INTEGER) + 1\n\n async function handleRestartRequest(\n req: IncomingMessage,\n res: ServerResponse,\n searchParams: URLSearchParams\n ) {\n if (req.method !== 'POST') {\n return middlewareResponse.methodNotAllowed(res)\n }\n\n const shouldInvalidateFileSystemCache = searchParams.has(\n 'invalidateFileSystemCache'\n )\n if (shouldInvalidateFileSystemCache) {\n if (webpackCacheDirectories != null) {\n await Promise.all(\n Array.from(webpackCacheDirectories).map(\n invalidateWebpackFileSystemCache\n )\n )\n }\n if (turbopackProject != null) {\n await turbopackProject.invalidateFileSystemCache()\n }\n }\n\n telemetry.record({\n eventName: EVENT_DEV_OVERLAY_RESTART_SERVER,\n payload: { invalidateFileSystemCache: shouldInvalidateFileSystemCache },\n })\n\n // TODO: Use flushDetached\n await telemetry.flush()\n\n // do this async to try to give the response a chance to send\n // it's not really important if it doesn't though\n setTimeout(() => {\n process.exit(RESTART_EXIT_CODE)\n }, 0)\n\n return middlewareResponse.noContent(res)\n }\n\n async function handleServerStatus(req: IncomingMessage, res: ServerResponse) {\n if (req.method !== 'GET') {\n return middlewareResponse.methodNotAllowed(res)\n }\n\n return middlewareResponse.json(res, {\n executionId,\n })\n }\n\n return async function (\n req: IncomingMessage,\n res: ServerResponse,\n next: () => void\n ): Promise {\n const { pathname, searchParams } = new URL(`http://n${req.url}`)\n\n switch (pathname) {\n case '/__nextjs_restart_dev':\n return await handleRestartRequest(req, res, searchParams)\n case '/__nextjs_server_status':\n return await handleServerStatus(req, res)\n default:\n return next()\n }\n }\n}\n"],"names":["RESTART_EXIT_CODE","middlewareResponse","invalidateFileSystemCache","invalidateWebpackFileSystemCache","EVENT_DEV_OVERLAY_RESTART_SERVER","getRestartDevServerMiddleware","telemetry","turbopackProject","webpackCacheDirectories","executionId","Math","floor","random","Number","MAX_SAFE_INTEGER","handleRestartRequest","req","res","searchParams","method","methodNotAllowed","shouldInvalidateFileSystemCache","has","Promise","all","Array","from","map","record","eventName","payload","flush","setTimeout","process","exit","noContent","handleServerStatus","json","next","pathname","URL","url"],"mappings":"AAEA,SAASA,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,kBAAkB,QAAQ,wBAAuB;AAE1D,SAASC,6BAA6BC,gCAAgC,QAAQ,yCAAwC;AAEtH,MAAMC,mCAAmC;AAQzC,OAAO,SAASC,8BAA8B,EAC5CC,SAAS,EACTC,gBAAgB,EAChBC,uBAAuB,EACU;IACjC;;;;;;GAMC,GACD,MAAMC,cACJC,KAAKC,KAAK,CAACD,KAAKE,MAAM,KAAKC,OAAOC,gBAAgB,IAAI;IAExD,eAAeC,qBACbC,GAAoB,EACpBC,GAAmB,EACnBC,YAA6B;QAE7B,IAAIF,IAAIG,MAAM,KAAK,QAAQ;YACzB,OAAOlB,mBAAmBmB,gBAAgB,CAACH;QAC7C;QAEA,MAAMI,kCAAkCH,aAAaI,GAAG,CACtD;QAEF,IAAID,iCAAiC;YACnC,IAAIb,2BAA2B,MAAM;gBACnC,MAAMe,QAAQC,GAAG,CACfC,MAAMC,IAAI,CAAClB,yBAAyBmB,GAAG,CACrCxB;YAGN;YACA,IAAII,oBAAoB,MAAM;gBAC5B,MAAMA,iBAAiBL,yBAAyB;YAClD;QACF;QAEAI,UAAUsB,MAAM,CAAC;YACfC,WAAWzB;YACX0B,SAAS;gBAAE5B,2BAA2BmB;YAAgC;QACxE;QAEA,0BAA0B;QAC1B,MAAMf,UAAUyB,KAAK;QAErB,6DAA6D;QAC7D,iDAAiD;QACjDC,WAAW;YACTC,QAAQC,IAAI,CAAClC;QACf,GAAG;QAEH,OAAOC,mBAAmBkC,SAAS,CAAClB;IACtC;IAEA,eAAemB,mBAAmBpB,GAAoB,EAAEC,GAAmB;QACzE,IAAID,IAAIG,MAAM,KAAK,OAAO;YACxB,OAAOlB,mBAAmBmB,gBAAgB,CAACH;QAC7C;QAEA,OAAOhB,mBAAmBoC,IAAI,CAACpB,KAAK;YAClCR;QACF;IACF;IAEA,OAAO,eACLO,GAAoB,EACpBC,GAAmB,EACnBqB,IAAgB;QAEhB,MAAM,EAAEC,QAAQ,EAAErB,YAAY,EAAE,GAAG,IAAIsB,IAAI,CAAC,QAAQ,EAAExB,IAAIyB,GAAG,EAAE;QAE/D,OAAQF;YACN,KAAK;gBACH,OAAO,MAAMxB,qBAAqBC,KAAKC,KAAKC;YAC9C,KAAK;gBACH,OAAO,MAAMkB,mBAAmBpB,KAAKC;YACvC;gBACE,OAAOqB;QACX;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/shared.js b/e-commerce/node_modules/next/dist/esm/next-devtools/server/shared.js
new file mode 100644
index 0000000000000000000000000000000000000000..69a66fec8bba00ffe97f3c14a58a3b2ecbe8ad34
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/shared.js
@@ -0,0 +1,42 @@
+import { codeFrameColumns } from '../../shared/lib/errors/code-frame';
+import { stdoutIsTerminal } from '../../lib/picocolors';
+import { ignoreListAnonymousStackFramesIfSandwiched as ignoreListAnonymousStackFramesIfSandwichedGeneric } from '../../server/lib/source-maps';
+export const DEVTOOLS_CODE_FRAME_MAX_WIDTH = 1000;
+export function ignoreListAnonymousStackFramesIfSandwiched(responses) {
+ ignoreListAnonymousStackFramesIfSandwichedGeneric(responses, (response)=>{
+ return response.status === 'fulfilled' && response.value.originalStackFrame !== null && response.value.originalStackFrame.file === '';
+ }, (response)=>{
+ return response.status === 'fulfilled' && response.value.originalStackFrame !== null && response.value.originalStackFrame.ignored === true;
+ }, (response)=>{
+ return response.status === 'fulfilled' && response.value.originalStackFrame !== null ? response.value.originalStackFrame.methodName : '';
+ }, (response)=>{
+ ;
+ response.value.originalStackFrame.ignored = true;
+ });
+}
+/**
+ * It looks up the code frame of the traced source.
+ * @note It ignores Next.js/React internals, as these can often be huge bundled files.
+ */ export function getOriginalCodeFrame(frame, source, colorsOrOptions = stdoutIsTerminal) {
+ if (!source || frame.line1 == null) {
+ return null;
+ }
+ const { colors, maxWidth } = typeof colorsOrOptions === 'boolean' ? {
+ colors: colorsOrOptions,
+ maxWidth: undefined
+ } : {
+ colors: colorsOrOptions.colors ?? stdoutIsTerminal,
+ maxWidth: colorsOrOptions.maxWidth
+ };
+ return codeFrameColumns(source, {
+ start: {
+ line: frame.line1,
+ column: frame.column1 ?? undefined
+ }
+ }, {
+ color: colors,
+ maxWidth
+ }) ?? null;
+}
+
+//# sourceMappingURL=shared.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/server/shared.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/server/shared.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..a963c3dcd39a1a0796e671568d06040ec2e565f3
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/server/shared.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/server/shared.ts"],"sourcesContent":["import { codeFrameColumns } from '../../shared/lib/errors/code-frame'\nimport { stdoutIsTerminal } from '../../lib/picocolors'\nimport type { StackFrame } from '../../server/lib/parse-stack'\nimport { ignoreListAnonymousStackFramesIfSandwiched as ignoreListAnonymousStackFramesIfSandwichedGeneric } from '../../server/lib/source-maps'\n\nexport type { StackFrame }\n\nexport interface IgnorableStackFrame extends StackFrame {\n ignored: boolean\n}\n\nexport interface OriginalStackFramesRequest {\n frames: readonly StackFrame[]\n isServer: boolean\n isEdgeServer: boolean\n isAppDirectory: boolean\n}\n\nexport type OriginalStackFramesResponse = OriginalStackFrameResponseResult[]\n\nexport type OriginalStackFrameResponseResult =\n PromiseSettledResult\n\nexport interface OriginalStackFrameResponse {\n originalStackFrame: (StackFrame & { ignored: boolean }) | null\n originalCodeFrame: string | null\n}\n\ntype CodeFrameRenderOptions = {\n colors?: boolean\n maxWidth?: number\n}\n\nexport const DEVTOOLS_CODE_FRAME_MAX_WIDTH = 1000\n\nexport function ignoreListAnonymousStackFramesIfSandwiched(\n responses: OriginalStackFramesResponse\n): void {\n ignoreListAnonymousStackFramesIfSandwichedGeneric(\n responses,\n (response) => {\n return (\n response.status === 'fulfilled' &&\n response.value.originalStackFrame !== null &&\n response.value.originalStackFrame.file === ''\n )\n },\n (response) => {\n return (\n response.status === 'fulfilled' &&\n response.value.originalStackFrame !== null &&\n response.value.originalStackFrame.ignored === true\n )\n },\n (response) => {\n return response.status === 'fulfilled' &&\n response.value.originalStackFrame !== null\n ? response.value.originalStackFrame.methodName\n : ''\n },\n (response) => {\n ;(\n response as PromiseFulfilledResult\n ).value.originalStackFrame!.ignored = true\n }\n )\n}\n\n/**\n * It looks up the code frame of the traced source.\n * @note It ignores Next.js/React internals, as these can often be huge bundled files.\n */\nexport function getOriginalCodeFrame(\n frame: IgnorableStackFrame,\n source: string | null,\n colorsOrOptions: boolean | CodeFrameRenderOptions = stdoutIsTerminal\n): string | null {\n if (!source || frame.line1 == null) {\n return null\n }\n\n const { colors, maxWidth } =\n typeof colorsOrOptions === 'boolean'\n ? { colors: colorsOrOptions, maxWidth: undefined }\n : {\n colors: colorsOrOptions.colors ?? stdoutIsTerminal,\n maxWidth: colorsOrOptions.maxWidth,\n }\n\n return (\n codeFrameColumns(\n source,\n {\n start: {\n line: frame.line1,\n column: frame.column1 ?? undefined,\n },\n },\n {\n color: colors,\n maxWidth,\n }\n ) ?? null\n )\n}\n"],"names":["codeFrameColumns","stdoutIsTerminal","ignoreListAnonymousStackFramesIfSandwiched","ignoreListAnonymousStackFramesIfSandwichedGeneric","DEVTOOLS_CODE_FRAME_MAX_WIDTH","responses","response","status","value","originalStackFrame","file","ignored","methodName","getOriginalCodeFrame","frame","source","colorsOrOptions","line1","colors","maxWidth","undefined","start","line","column","column1","color"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qCAAoC;AACrE,SAASC,gBAAgB,QAAQ,uBAAsB;AAEvD,SAASC,8CAA8CC,iDAAiD,QAAQ,+BAA8B;AA8B9I,OAAO,MAAMC,gCAAgC,KAAI;AAEjD,OAAO,SAASF,2CACdG,SAAsC;IAEtCF,kDACEE,WACA,CAACC;QACC,OACEA,SAASC,MAAM,KAAK,eACpBD,SAASE,KAAK,CAACC,kBAAkB,KAAK,QACtCH,SAASE,KAAK,CAACC,kBAAkB,CAACC,IAAI,KAAK;IAE/C,GACA,CAACJ;QACC,OACEA,SAASC,MAAM,KAAK,eACpBD,SAASE,KAAK,CAACC,kBAAkB,KAAK,QACtCH,SAASE,KAAK,CAACC,kBAAkB,CAACE,OAAO,KAAK;IAElD,GACA,CAACL;QACC,OAAOA,SAASC,MAAM,KAAK,eACzBD,SAASE,KAAK,CAACC,kBAAkB,KAAK,OACpCH,SAASE,KAAK,CAACC,kBAAkB,CAACG,UAAU,GAC5C;IACN,GACA,CAACN;;QAEGA,SACAE,KAAK,CAACC,kBAAkB,CAAEE,OAAO,GAAG;IACxC;AAEJ;AAEA;;;CAGC,GACD,OAAO,SAASE,qBACdC,KAA0B,EAC1BC,MAAqB,EACrBC,kBAAoDf,gBAAgB;IAEpE,IAAI,CAACc,UAAUD,MAAMG,KAAK,IAAI,MAAM;QAClC,OAAO;IACT;IAEA,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GACxB,OAAOH,oBAAoB,YACvB;QAAEE,QAAQF;QAAiBG,UAAUC;IAAU,IAC/C;QACEF,QAAQF,gBAAgBE,MAAM,IAAIjB;QAClCkB,UAAUH,gBAAgBG,QAAQ;IACpC;IAEN,OACEnB,iBACEe,QACA;QACEM,OAAO;YACLC,MAAMR,MAAMG,KAAK;YACjBM,QAAQT,MAAMU,OAAO,IAAIJ;QAC3B;IACF,GACA;QACEK,OAAOP;QACPC;IACF,MACG;AAET","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/console-error.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/console-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..dad9923da3b7ee4552ccb74f1e1cd931017e4474
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/console-error.js
@@ -0,0 +1,15 @@
+// To distinguish from React error.digest, we use a different symbol here to determine if the error is from console.error or unhandled promise rejection.
+const digestSym = Symbol.for('next.console.error.digest');
+export function createConsoleError(message, environmentName) {
+ const error = typeof message === 'string' ? new Error(message) : message;
+ error[digestSym] = 'NEXT_CONSOLE_ERROR';
+ if (environmentName && !error.environmentName) {
+ error.environmentName = environmentName;
+ }
+ return error;
+}
+export const isConsoleError = (error)=>{
+ return error && error[digestSym] === 'NEXT_CONSOLE_ERROR';
+};
+
+//# sourceMappingURL=console-error.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/console-error.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/console-error.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..2f8203500b8f240189ef65c3e213b7ad945990a1
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/console-error.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/console-error.ts"],"sourcesContent":["// To distinguish from React error.digest, we use a different symbol here to determine if the error is from console.error or unhandled promise rejection.\nconst digestSym = Symbol.for('next.console.error.digest')\n\n// Represent non Error shape unhandled promise rejections or console.error errors.\n// Those errors will be captured and displayed in Error Overlay.\ntype ConsoleError = Error & {\n [digestSym]: 'NEXT_CONSOLE_ERROR'\n environmentName: string\n}\n\nexport function createConsoleError(\n message: string | Error,\n environmentName?: string | null\n): ConsoleError {\n const error = (\n typeof message === 'string' ? new Error(message) : message\n ) as ConsoleError\n error[digestSym] = 'NEXT_CONSOLE_ERROR'\n\n if (environmentName && !error.environmentName) {\n error.environmentName = environmentName\n }\n\n return error\n}\n\nexport const isConsoleError = (error: any): error is ConsoleError => {\n return error && error[digestSym] === 'NEXT_CONSOLE_ERROR'\n}\n"],"names":["digestSym","Symbol","for","createConsoleError","message","environmentName","error","Error","isConsoleError"],"mappings":"AAAA,yJAAyJ;AACzJ,MAAMA,YAAYC,OAAOC,GAAG,CAAC;AAS7B,OAAO,SAASC,mBACdC,OAAuB,EACvBC,eAA+B;IAE/B,MAAMC,QACJ,OAAOF,YAAY,WAAW,IAAIG,MAAMH,WAAWA;IAErDE,KAAK,CAACN,UAAU,GAAG;IAEnB,IAAIK,mBAAmB,CAACC,MAAMD,eAAe,EAAE;QAC7CC,MAAMD,eAAe,GAAGA;IAC1B;IAEA,OAAOC;AACT;AAEA,OAAO,MAAME,iBAAiB,CAACF;IAC7B,OAAOA,SAASA,KAAK,CAACN,UAAU,KAAK;AACvC,EAAC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/deepmerge.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/deepmerge.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c751ae63f36686aa573c1b84e15e769672dddaa
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/deepmerge.js
@@ -0,0 +1,25 @@
+export function deepMerge(target, source) {
+ if (!source || typeof source !== 'object' || Array.isArray(source)) {
+ return source;
+ }
+ if (!target || typeof target !== 'object' || Array.isArray(target)) {
+ return source;
+ }
+ const result = {
+ ...target
+ };
+ for(const key in source){
+ const sourceValue = source[key];
+ const targetValue = target[key];
+ if (sourceValue !== undefined) {
+ if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue) && targetValue && typeof targetValue === 'object' && !Array.isArray(targetValue)) {
+ result[key] = deepMerge(targetValue, sourceValue);
+ } else {
+ result[key] = sourceValue;
+ }
+ }
+ }
+ return result;
+}
+
+//# sourceMappingURL=deepmerge.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/deepmerge.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/deepmerge.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..fad9bc80148e9279cb4800a3d8e686cc6bc7df4d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/deepmerge.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/deepmerge.ts"],"sourcesContent":["export function deepMerge(target: any, source: any): any {\n if (!source || typeof source !== 'object' || Array.isArray(source)) {\n return source\n }\n\n if (!target || typeof target !== 'object' || Array.isArray(target)) {\n return source\n }\n\n const result = { ...target }\n\n for (const key in source) {\n const sourceValue = source[key]\n const targetValue = target[key]\n\n if (sourceValue !== undefined) {\n if (\n sourceValue &&\n typeof sourceValue === 'object' &&\n !Array.isArray(sourceValue) &&\n targetValue &&\n typeof targetValue === 'object' &&\n !Array.isArray(targetValue)\n ) {\n result[key] = deepMerge(targetValue, sourceValue)\n } else {\n result[key] = sourceValue\n }\n }\n }\n\n return result\n}\n"],"names":["deepMerge","target","source","Array","isArray","result","key","sourceValue","targetValue","undefined"],"mappings":"AAAA,OAAO,SAASA,UAAUC,MAAW,EAAEC,MAAW;IAChD,IAAI,CAACA,UAAU,OAAOA,WAAW,YAAYC,MAAMC,OAAO,CAACF,SAAS;QAClE,OAAOA;IACT;IAEA,IAAI,CAACD,UAAU,OAAOA,WAAW,YAAYE,MAAMC,OAAO,CAACH,SAAS;QAClE,OAAOC;IACT;IAEA,MAAMG,SAAS;QAAE,GAAGJ,MAAM;IAAC;IAE3B,IAAK,MAAMK,OAAOJ,OAAQ;QACxB,MAAMK,cAAcL,MAAM,CAACI,IAAI;QAC/B,MAAME,cAAcP,MAAM,CAACK,IAAI;QAE/B,IAAIC,gBAAgBE,WAAW;YAC7B,IACEF,eACA,OAAOA,gBAAgB,YACvB,CAACJ,MAAMC,OAAO,CAACG,gBACfC,eACA,OAAOA,gBAAgB,YACvB,CAACL,MAAMC,OAAO,CAACI,cACf;gBACAH,MAAM,CAACC,IAAI,GAAGN,UAAUQ,aAAaD;YACvC,OAAO;gBACLF,MAAM,CAACC,IAAI,GAAGC;YAChB;QACF;IACF;IAEA,OAAOF;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/devtools-config-schema.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/devtools-config-schema.js
new file mode 100644
index 0000000000000000000000000000000000000000..79e46cdaf6c54984d62ad11bb53bea1b1493c681
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/devtools-config-schema.js
@@ -0,0 +1,33 @@
+import { z } from 'next/dist/compiled/zod';
+export const devToolsConfigSchema = z.object({
+ theme: z.enum([
+ 'light',
+ 'dark',
+ 'system'
+ ]).optional(),
+ disableDevIndicator: z.boolean().optional(),
+ devToolsPosition: z.enum([
+ 'top-left',
+ 'top-right',
+ 'bottom-left',
+ 'bottom-right'
+ ]).optional(),
+ devToolsPanelPosition: z.record(z.string(), z.enum([
+ 'top-left',
+ 'top-right',
+ 'bottom-left',
+ 'bottom-right'
+ ])).optional(),
+ devToolsPanelSize: z.record(z.string(), z.object({
+ width: z.number(),
+ height: z.number()
+ })).optional(),
+ scale: z.number().optional(),
+ hideShortcut: z.string().nullable().optional(),
+ requestInsights: z.object({
+ showInternal: z.boolean().optional(),
+ verbose: z.boolean().optional()
+ }).optional()
+});
+
+//# sourceMappingURL=devtools-config-schema.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/devtools-config-schema.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/devtools-config-schema.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..e3d044bfb8e706a3ae0003f4cf14baf1db4a7426
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/devtools-config-schema.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/devtools-config-schema.ts"],"sourcesContent":["import type { DevToolsConfig } from '../dev-overlay/shared'\nimport { z } from 'next/dist/compiled/zod'\n\nexport const devToolsConfigSchema: z.ZodType = z.object({\n theme: z.enum(['light', 'dark', 'system']).optional(),\n disableDevIndicator: z.boolean().optional(),\n devToolsPosition: z\n .enum(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n .optional(),\n devToolsPanelPosition: z\n .record(\n z.string(),\n z.enum(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n )\n .optional(),\n devToolsPanelSize: z\n .record(z.string(), z.object({ width: z.number(), height: z.number() }))\n .optional(),\n scale: z.number().optional(),\n hideShortcut: z.string().nullable().optional(),\n requestInsights: z\n .object({\n showInternal: z.boolean().optional(),\n verbose: z.boolean().optional(),\n })\n .optional(),\n})\n"],"names":["z","devToolsConfigSchema","object","theme","enum","optional","disableDevIndicator","boolean","devToolsPosition","devToolsPanelPosition","record","string","devToolsPanelSize","width","number","height","scale","hideShortcut","nullable","requestInsights","showInternal","verbose"],"mappings":"AACA,SAASA,CAAC,QAAQ,yBAAwB;AAE1C,OAAO,MAAMC,uBAAkDD,EAAEE,MAAM,CAAC;IACtEC,OAAOH,EAAEI,IAAI,CAAC;QAAC;QAAS;QAAQ;KAAS,EAAEC,QAAQ;IACnDC,qBAAqBN,EAAEO,OAAO,GAAGF,QAAQ;IACzCG,kBAAkBR,EACfI,IAAI,CAAC;QAAC;QAAY;QAAa;QAAe;KAAe,EAC7DC,QAAQ;IACXI,uBAAuBT,EACpBU,MAAM,CACLV,EAAEW,MAAM,IACRX,EAAEI,IAAI,CAAC;QAAC;QAAY;QAAa;QAAe;KAAe,GAEhEC,QAAQ;IACXO,mBAAmBZ,EAChBU,MAAM,CAACV,EAAEW,MAAM,IAAIX,EAAEE,MAAM,CAAC;QAAEW,OAAOb,EAAEc,MAAM;QAAIC,QAAQf,EAAEc,MAAM;IAAG,IACpET,QAAQ;IACXW,OAAOhB,EAAEc,MAAM,GAAGT,QAAQ;IAC1BY,cAAcjB,EAAEW,MAAM,GAAGO,QAAQ,GAAGb,QAAQ;IAC5Cc,iBAAiBnB,EACdE,MAAM,CAAC;QACNkB,cAAcpB,EAAEO,OAAO,GAAGF,QAAQ;QAClCgB,SAASrB,EAAEO,OAAO,GAAGF,QAAQ;IAC/B,GACCA,QAAQ;AACb,GAAE","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/forward-logs-shared.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/forward-logs-shared.js
new file mode 100644
index 0000000000000000000000000000000000000000..4ad37ca3f49d214491def3b4f8a6d878ef67a340
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/forward-logs-shared.js
@@ -0,0 +1,46 @@
+export const UNDEFINED_MARKER = '__next_tagged_undefined';
+const alreadyLoggedOnServerSymbol = Symbol('nextAlreadyLoggedOnServer');
+/**
+ * Marks an error that originated on the server and was already logged there.
+ * Such errors are also sent to the browser, where they get logged to the
+ * browser console and shown in the dev overlay. This marker lets the
+ * browser-to-terminal log forwarding skip them, so they aren't replayed back to
+ * the CLI as duplicates.
+ */ export function markErrorAsAlreadyLoggedOnServer(error) {
+ Object.defineProperty(error, alreadyLoggedOnServerSymbol, {
+ value: true,
+ enumerable: false,
+ configurable: true
+ });
+}
+export function wasErrorAlreadyLoggedOnServer(value) {
+ return typeof value === 'object' && value !== null && value[alreadyLoggedOnServerSymbol] === true;
+}
+// Based on https://github.com/facebook/react/blob/28dc0776be2e1370fe217549d32aee2519f0cf05/packages/react-server/src/ReactFlightServer.js#L248
+export function patchConsoleMethod(methodName, wrapper) {
+ const descriptor = Object.getOwnPropertyDescriptor(console, methodName);
+ if (descriptor && (descriptor.configurable || descriptor.writable) && typeof descriptor.value === 'function') {
+ const originalMethod = descriptor.value;
+ const originalName = Object.getOwnPropertyDescriptor(originalMethod, 'name');
+ const wrapperMethod = function(...args) {
+ wrapper(methodName, ...args);
+ originalMethod.apply(this, args);
+ };
+ if (originalName) {
+ Object.defineProperty(wrapperMethod, 'name', originalName);
+ }
+ Object.defineProperty(console, methodName, {
+ value: wrapperMethod
+ });
+ return ()=>{
+ Object.defineProperty(console, methodName, {
+ value: originalMethod,
+ writable: descriptor.writable,
+ configurable: descriptor.configurable
+ });
+ };
+ }
+ return ()=>{};
+}
+
+//# sourceMappingURL=forward-logs-shared.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/forward-logs-shared.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/forward-logs-shared.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ab8a64155ca9f3009d57263a73766ea68c203bba
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/forward-logs-shared.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/forward-logs-shared.ts"],"sourcesContent":["export type LogMethod =\n | 'log'\n | 'info'\n | 'debug'\n | 'table'\n | 'error'\n | 'assert'\n | 'dir'\n | 'dirxml'\n | 'group'\n | 'groupCollapsed'\n | 'groupEnd'\n | 'trace'\n | 'warn'\n\nexport type ConsoleEntry = {\n kind: 'console'\n method: LogMethod\n consoleMethodStack: string | null\n args: Array<\n | {\n kind: 'arg'\n data: T\n }\n | {\n kind: 'formatted-error-arg'\n prefix: string\n stack: string\n }\n >\n}\n\nexport type ConsoleErrorEntry = {\n kind: 'any-logged-error'\n method: 'error'\n consoleErrorStack: string\n args: Array<\n | {\n kind: 'arg'\n data: T\n isRejectionMessage?: boolean\n }\n | {\n kind: 'formatted-error-arg'\n prefix: string\n stack: string | null\n }\n >\n}\n\nexport type FormattedErrorEntry = {\n kind: 'formatted-error'\n prefix: string\n stack: string\n method: 'error'\n}\n\nexport type ClientLogEntry =\n | ConsoleEntry\n | ConsoleErrorEntry\n | FormattedErrorEntry\nexport type ServerLogEntry =\n | ConsoleEntry\n | ConsoleErrorEntry\n | FormattedErrorEntry\n\nexport const UNDEFINED_MARKER = '__next_tagged_undefined'\n\nconst alreadyLoggedOnServerSymbol = Symbol('nextAlreadyLoggedOnServer')\n\n/**\n * Marks an error that originated on the server and was already logged there.\n * Such errors are also sent to the browser, where they get logged to the\n * browser console and shown in the dev overlay. This marker lets the\n * browser-to-terminal log forwarding skip them, so they aren't replayed back to\n * the CLI as duplicates.\n */\nexport function markErrorAsAlreadyLoggedOnServer(error: object): void {\n Object.defineProperty(error, alreadyLoggedOnServerSymbol, {\n value: true,\n enumerable: false,\n configurable: true,\n })\n}\n\nexport function wasErrorAlreadyLoggedOnServer(value: unknown): boolean {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as Record)[alreadyLoggedOnServerSymbol] === true\n )\n}\n\n// Based on https://github.com/facebook/react/blob/28dc0776be2e1370fe217549d32aee2519f0cf05/packages/react-server/src/ReactFlightServer.js#L248\nexport function patchConsoleMethod(\n methodName: T,\n wrapper: (\n methodName: T,\n ...args: Console[T] extends (...args: infer P) => any ? P : never[]\n ) => void\n): () => void {\n const descriptor = Object.getOwnPropertyDescriptor(console, methodName)\n if (\n descriptor &&\n (descriptor.configurable || descriptor.writable) &&\n typeof descriptor.value === 'function'\n ) {\n const originalMethod = descriptor.value as Console[T] extends (\n ...args: any[]\n ) => any\n ? Console[T]\n : never\n const originalName = Object.getOwnPropertyDescriptor(originalMethod, 'name')\n const wrapperMethod = function (\n this: typeof console,\n ...args: Console[T] extends (...args: infer P) => any ? P : never[]\n ) {\n wrapper(methodName, ...args)\n\n originalMethod.apply(this, args)\n }\n if (originalName) {\n Object.defineProperty(wrapperMethod, 'name', originalName)\n }\n Object.defineProperty(console, methodName, {\n value: wrapperMethod,\n })\n\n return () => {\n Object.defineProperty(console, methodName, {\n value: originalMethod,\n writable: descriptor.writable,\n configurable: descriptor.configurable,\n })\n }\n }\n\n return () => {}\n}\n"],"names":["UNDEFINED_MARKER","alreadyLoggedOnServerSymbol","Symbol","markErrorAsAlreadyLoggedOnServer","error","Object","defineProperty","value","enumerable","configurable","wasErrorAlreadyLoggedOnServer","patchConsoleMethod","methodName","wrapper","descriptor","getOwnPropertyDescriptor","console","writable","originalMethod","originalName","wrapperMethod","args","apply"],"mappings":"AAkEA,OAAO,MAAMA,mBAAmB,0BAAyB;AAEzD,MAAMC,8BAA8BC,OAAO;AAE3C;;;;;;CAMC,GACD,OAAO,SAASC,iCAAiCC,KAAa;IAC5DC,OAAOC,cAAc,CAACF,OAAOH,6BAA6B;QACxDM,OAAO;QACPC,YAAY;QACZC,cAAc;IAChB;AACF;AAEA,OAAO,SAASC,8BAA8BH,KAAc;IAC1D,OACE,OAAOA,UAAU,YACjBA,UAAU,QACV,AAACA,KAAiC,CAACN,4BAA4B,KAAK;AAExE;AAEA,+IAA+I;AAC/I,OAAO,SAASU,mBACdC,UAAa,EACbC,OAGS;IAET,MAAMC,aAAaT,OAAOU,wBAAwB,CAACC,SAASJ;IAC5D,IACEE,cACCA,CAAAA,WAAWL,YAAY,IAAIK,WAAWG,QAAQ,AAAD,KAC9C,OAAOH,WAAWP,KAAK,KAAK,YAC5B;QACA,MAAMW,iBAAiBJ,WAAWP,KAAK;QAKvC,MAAMY,eAAed,OAAOU,wBAAwB,CAACG,gBAAgB;QACrE,MAAME,gBAAgB,SAEpB,GAAGC,IAAgE;YAEnER,QAAQD,eAAeS;YAEvBH,eAAeI,KAAK,CAAC,IAAI,EAAED;QAC7B;QACA,IAAIF,cAAc;YAChBd,OAAOC,cAAc,CAACc,eAAe,QAAQD;QAC/C;QACAd,OAAOC,cAAc,CAACU,SAASJ,YAAY;YACzCL,OAAOa;QACT;QAEA,OAAO;YACLf,OAAOC,cAAc,CAACU,SAASJ,YAAY;gBACzCL,OAAOW;gBACPD,UAAUH,WAAWG,QAAQ;gBAC7BR,cAAcK,WAAWL,YAAY;YACvC;QACF;IACF;IAEA,OAAO,KAAO;AAChB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/hydration-error.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/hydration-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..3e898a90a9753129df9ac75c0ae27c6e5e014509
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/hydration-error.js
@@ -0,0 +1,3 @@
+export { };
+
+//# sourceMappingURL=hydration-error.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/hydration-error.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/hydration-error.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..b30f2bc1ef77aba70f237863aef38cc3796c84ed
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/hydration-error.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/hydration-error.ts"],"sourcesContent":["export type HydrationErrorState = {\n // Hydration warning template format: \n warning?: string\n reactOutputComponentDiff?: string\n}\n"],"names":[],"mappings":"AAAA,WAIC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-18-hydration-error.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-18-hydration-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..8619749248241cbdb37eeac6606565bf93c0c1e4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-18-hydration-error.js
@@ -0,0 +1,35 @@
+import isError from '../../lib/is-error';
+export function isHydrationError(error) {
+ return isError(error) && (error.message === 'Hydration failed because the initial UI does not match what was rendered on the server.' || error.message === 'Text content does not match server-rendered HTML.');
+}
+export function isHydrationWarning(message) {
+ return isHtmlTagsWarning(message) || isTextInTagsMismatchWarning(message) || isTextWarning(message);
+}
+// https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference
+const htmlTagsWarnings = new Set([
+ 'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s',
+ 'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s'
+]);
+const textAndTagsMismatchWarnings = new Set([
+ 'Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s',
+ 'Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s'
+]);
+const textWarnings = new Set([
+ 'Warning: Text content did not match. Server: "%s" Client: "%s"%s'
+]);
+export const getHydrationWarningType = (message)=>{
+ if (typeof message !== 'string') {
+ // TODO: Doesn't make sense to treat no message as a hydration error message.
+ // We should bail out somewhere earlier.
+ return 'text';
+ }
+ const normalizedMessage = message.startsWith('Warning: ') ? message : `Warning: ${message}`;
+ if (isHtmlTagsWarning(normalizedMessage)) return 'tag';
+ if (isTextInTagsMismatchWarning(normalizedMessage)) return 'text-in-tag';
+ return 'text';
+};
+const isHtmlTagsWarning = (message)=>typeof message === 'string' && htmlTagsWarnings.has(message);
+const isTextInTagsMismatchWarning = (msg)=>typeof msg === 'string' && textAndTagsMismatchWarnings.has(msg);
+const isTextWarning = (msg)=>typeof msg === 'string' && textWarnings.has(msg);
+
+//# sourceMappingURL=react-18-hydration-error.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-18-hydration-error.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-18-hydration-error.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..9fefcfad8e6efbdacdf29635402c55d3ec7b3647
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-18-hydration-error.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/react-18-hydration-error.ts"],"sourcesContent":["import isError from '../../lib/is-error'\n\nexport function isHydrationError(error: unknown): boolean {\n return (\n isError(error) &&\n (error.message ===\n 'Hydration failed because the initial UI does not match what was rendered on the server.' ||\n error.message === 'Text content does not match server-rendered HTML.')\n )\n}\n\nexport function isHydrationWarning(message: unknown): message is string {\n return (\n isHtmlTagsWarning(message) ||\n isTextInTagsMismatchWarning(message) ||\n isTextWarning(message)\n )\n}\n\ntype NullableText = string | null | undefined\n\n// https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference\nconst htmlTagsWarnings = new Set([\n 'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s',\n 'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s',\n])\nconst textAndTagsMismatchWarnings = new Set([\n 'Warning: Expected server HTML to contain a matching text node for \"%s\" in <%s>.%s',\n 'Warning: Did not expect server HTML to contain the text node \"%s\" in <%s>.%s',\n])\nconst textWarnings = new Set([\n 'Warning: Text content did not match. Server: \"%s\" Client: \"%s\"%s',\n])\n\nexport const getHydrationWarningType = (\n message: NullableText\n): 'tag' | 'text' | 'text-in-tag' => {\n if (typeof message !== 'string') {\n // TODO: Doesn't make sense to treat no message as a hydration error message.\n // We should bail out somewhere earlier.\n return 'text'\n }\n\n const normalizedMessage = message.startsWith('Warning: ')\n ? message\n : `Warning: ${message}`\n\n if (isHtmlTagsWarning(normalizedMessage)) return 'tag'\n if (isTextInTagsMismatchWarning(normalizedMessage)) return 'text-in-tag'\n\n return 'text'\n}\n\nconst isHtmlTagsWarning = (message: unknown) =>\n typeof message === 'string' && htmlTagsWarnings.has(message)\n\nconst isTextInTagsMismatchWarning = (msg: unknown) =>\n typeof msg === 'string' && textAndTagsMismatchWarnings.has(msg)\n\nconst isTextWarning = (msg: unknown) =>\n typeof msg === 'string' && textWarnings.has(msg)\n"],"names":["isError","isHydrationError","error","message","isHydrationWarning","isHtmlTagsWarning","isTextInTagsMismatchWarning","isTextWarning","htmlTagsWarnings","Set","textAndTagsMismatchWarnings","textWarnings","getHydrationWarningType","normalizedMessage","startsWith","has","msg"],"mappings":"AAAA,OAAOA,aAAa,qBAAoB;AAExC,OAAO,SAASC,iBAAiBC,KAAc;IAC7C,OACEF,QAAQE,UACPA,CAAAA,MAAMC,OAAO,KACZ,6FACAD,MAAMC,OAAO,KAAK,mDAAkD;AAE1E;AAEA,OAAO,SAASC,mBAAmBD,OAAgB;IACjD,OACEE,kBAAkBF,YAClBG,4BAA4BH,YAC5BI,cAAcJ;AAElB;AAIA,iIAAiI;AACjI,MAAMK,mBAAmB,IAAIC,IAAI;IAC/B;IACA;CACD;AACD,MAAMC,8BAA8B,IAAID,IAAI;IAC1C;IACA;CACD;AACD,MAAME,eAAe,IAAIF,IAAI;IAC3B;CACD;AAED,OAAO,MAAMG,0BAA0B,CACrCT;IAEA,IAAI,OAAOA,YAAY,UAAU;QAC/B,6EAA6E;QAC7E,wCAAwC;QACxC,OAAO;IACT;IAEA,MAAMU,oBAAoBV,QAAQW,UAAU,CAAC,eACzCX,UACA,CAAC,SAAS,EAAEA,SAAS;IAEzB,IAAIE,kBAAkBQ,oBAAoB,OAAO;IACjD,IAAIP,4BAA4BO,oBAAoB,OAAO;IAE3D,OAAO;AACT,EAAC;AAED,MAAMR,oBAAoB,CAACF,UACzB,OAAOA,YAAY,YAAYK,iBAAiBO,GAAG,CAACZ;AAEtD,MAAMG,8BAA8B,CAACU,MACnC,OAAOA,QAAQ,YAAYN,4BAA4BK,GAAG,CAACC;AAE7D,MAAMT,gBAAgB,CAACS,MACrB,OAAOA,QAAQ,YAAYL,aAAaI,GAAG,CAACC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-19-hydration-error.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-19-hydration-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..5a456927876aff18b0010689dd052efa20c0fa19
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-19-hydration-error.js
@@ -0,0 +1,55 @@
+export const REACT_HYDRATION_ERROR_LINK = 'https://react.dev/link/hydration-mismatch';
+export const NEXTJS_HYDRATION_ERROR_LINK = 'https://nextjs.org/docs/messages/react-hydration-error';
+/**
+ * Only React 19+ contains component stack diff in the error message
+ */ const errorMessagesWithComponentStackDiff = [
+ /^In HTML, (.+?) cannot be a child of <(.+?)>\.(.*)\nThis will cause a hydration error\.(.*)/,
+ /^In HTML, (.+?) cannot be a descendant of <(.+?)>\.\nThis will cause a hydration error\.(.*)/,
+ /^In HTML, text nodes cannot be a child of <(.+?)>\.\nThis will cause a hydration error\./,
+ /^In HTML, whitespace text nodes cannot be a child of <(.+?)>\. Make sure you don't have any extra whitespace between tags on each line of your source code\.\nThis will cause a hydration error\./
+];
+export function isHydrationError(error) {
+ return isErrorMessageWithComponentStackDiff(error.message) || /Hydration failed because the server rendered (text|HTML) didn't match the client\./.test(error.message) || /A tree hydrated but some attributes of the server rendered HTML didn't match the client properties./.test(error.message);
+}
+export function isErrorMessageWithComponentStackDiff(msg) {
+ return errorMessagesWithComponentStackDiff.some((regex)=>regex.test(msg));
+}
+export function getHydrationErrorStackInfo(error) {
+ const errorMessage = error.message;
+ if (isErrorMessageWithComponentStackDiff(errorMessage)) {
+ const [message, diffLog = ''] = errorMessage.split('\n\n');
+ const diff = diffLog.trim();
+ return {
+ message: diff === '' ? errorMessage.trim() : message.trim(),
+ diff,
+ notes: null
+ };
+ }
+ const [message, maybeComponentStackDiff] = errorMessage.split(`${REACT_HYDRATION_ERROR_LINK}`);
+ const trimmedMessage = message.trim();
+ // React built-in hydration diff starts with a newline
+ if (maybeComponentStackDiff !== undefined && maybeComponentStackDiff.length > 1) {
+ const diffs = [];
+ maybeComponentStackDiff.split('\n').forEach((line)=>{
+ if (line.trim() === '') return;
+ if (!line.trim().startsWith('at ')) {
+ diffs.push(line);
+ }
+ });
+ const [displayedMessage, ...notes] = trimmedMessage.split('\n\n');
+ return {
+ message: displayedMessage,
+ diff: diffs.join('\n'),
+ notes: notes.join('\n\n') || null
+ };
+ } else {
+ const [displayedMessage, ...notes] = trimmedMessage.split('\n\n');
+ return {
+ message: displayedMessage,
+ diff: null,
+ notes: notes.join('\n\n')
+ };
+ }
+}
+
+//# sourceMappingURL=react-19-hydration-error.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-19-hydration-error.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-19-hydration-error.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..c912bcc200cbc7f1b4beb973839847e04c8025af
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/react-19-hydration-error.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/react-19-hydration-error.ts"],"sourcesContent":["export const REACT_HYDRATION_ERROR_LINK =\n 'https://react.dev/link/hydration-mismatch'\nexport const NEXTJS_HYDRATION_ERROR_LINK =\n 'https://nextjs.org/docs/messages/react-hydration-error'\n\n/**\n * Only React 19+ contains component stack diff in the error message\n */\nconst errorMessagesWithComponentStackDiff = [\n /^In HTML, (.+?) cannot be a child of <(.+?)>\\.(.*)\\nThis will cause a hydration error\\.(.*)/,\n /^In HTML, (.+?) cannot be a descendant of <(.+?)>\\.\\nThis will cause a hydration error\\.(.*)/,\n /^In HTML, text nodes cannot be a child of <(.+?)>\\.\\nThis will cause a hydration error\\./,\n /^In HTML, whitespace text nodes cannot be a child of <(.+?)>\\. Make sure you don't have any extra whitespace between tags on each line of your source code\\.\\nThis will cause a hydration error\\./,\n]\n\nexport function isHydrationError(error: Error): boolean {\n return (\n isErrorMessageWithComponentStackDiff(error.message) ||\n /Hydration failed because the server rendered (text|HTML) didn't match the client\\./.test(\n error.message\n ) ||\n /A tree hydrated but some attributes of the server rendered HTML didn't match the client properties./.test(\n error.message\n )\n )\n}\n\nexport function isErrorMessageWithComponentStackDiff(msg: string): boolean {\n return errorMessagesWithComponentStackDiff.some((regex) => regex.test(msg))\n}\n\nexport function getHydrationErrorStackInfo(error: Error): {\n message: string | null\n notes: string | null\n diff: string | null\n} {\n const errorMessage = error.message\n if (isErrorMessageWithComponentStackDiff(errorMessage)) {\n const [message, diffLog = ''] = errorMessage.split('\\n\\n')\n const diff = diffLog.trim()\n return {\n message: diff === '' ? errorMessage.trim() : message.trim(),\n diff,\n notes: null,\n }\n }\n\n const [message, maybeComponentStackDiff] = errorMessage.split(\n `${REACT_HYDRATION_ERROR_LINK}`\n )\n const trimmedMessage = message.trim()\n // React built-in hydration diff starts with a newline\n if (\n maybeComponentStackDiff !== undefined &&\n maybeComponentStackDiff.length > 1\n ) {\n const diffs: string[] = []\n maybeComponentStackDiff.split('\\n').forEach((line) => {\n if (line.trim() === '') return\n if (!line.trim().startsWith('at ')) {\n diffs.push(line)\n }\n })\n\n const [displayedMessage, ...notes] = trimmedMessage.split('\\n\\n')\n return {\n message: displayedMessage,\n diff: diffs.join('\\n'),\n notes: notes.join('\\n\\n') || null,\n }\n } else {\n const [displayedMessage, ...notes] = trimmedMessage.split('\\n\\n')\n return {\n message: displayedMessage,\n diff: null,\n notes: notes.join('\\n\\n'),\n }\n }\n}\n"],"names":["REACT_HYDRATION_ERROR_LINK","NEXTJS_HYDRATION_ERROR_LINK","errorMessagesWithComponentStackDiff","isHydrationError","error","isErrorMessageWithComponentStackDiff","message","test","msg","some","regex","getHydrationErrorStackInfo","errorMessage","diffLog","split","diff","trim","notes","maybeComponentStackDiff","trimmedMessage","undefined","length","diffs","forEach","line","startsWith","push","displayedMessage","join"],"mappings":"AAAA,OAAO,MAAMA,6BACX,4CAA2C;AAC7C,OAAO,MAAMC,8BACX,yDAAwD;AAE1D;;CAEC,GACD,MAAMC,sCAAsC;IAC1C;IACA;IACA;IACA;CACD;AAED,OAAO,SAASC,iBAAiBC,KAAY;IAC3C,OACEC,qCAAqCD,MAAME,OAAO,KAClD,qFAAqFC,IAAI,CACvFH,MAAME,O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/e-commerce/node_modules/next/dist/esm/next-devtools/shared/request-insights.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/request-insights.js
new file mode 100644
index 0000000000000000000000000000000000000000..97077656ae328a569a68b2a75b306aa2e46465c7
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/request-insights.js
@@ -0,0 +1,3 @@
+export { getRequestInsightKey, getRequestInsightKind } from '../../shared/lib/request-insights';
+
+//# sourceMappingURL=request-insights.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/request-insights.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/request-insights.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..420cbd559f2463257d3fdc01d37be9958388b8c1
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/request-insights.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/request-insights.ts"],"sourcesContent":["import type { RequestInsightKind } from '../../shared/lib/request-insights'\n\nexport {\n getRequestInsightKey,\n getRequestInsightKind,\n type RequestInsightIdentity,\n type RequestInsightKind,\n} from '../../shared/lib/request-insights'\n\ntype RequestInsightAttributeValue =\n | string\n | number\n | boolean\n | Array\n | Array\n | Array\n\nexport type RequestInsightSpan = {\n name: string\n startTime: number\n durationMs?: number\n status?: 'ok' | 'error'\n traceId?: string\n spanId?: string\n parentSpanId?: string\n attributes?: Record\n links?: Array<{\n traceId: string\n spanId: string\n attributes?: Record\n }>\n events?: Array<{\n name: string\n timestamp: number\n attributes?: Record\n }>\n error?: {\n type?: string\n message?: string\n }\n}\n\nexport type RequestInsightFetch = {\n url?: string\n method?: string\n statusCode?: number\n startTime?: number\n durationMs?: number\n cacheStatus?: string\n cacheReason?: string\n index?: number\n}\n\nexport type RequestInsight = {\n requestId: string\n kind?: RequestInsightKind\n htmlRequestId: string\n route?: string\n url?: string\n startTime: number\n durationMs?: number\n status: 'ok' | 'error' | 'pending'\n spans: RequestInsightSpan[]\n fetches: RequestInsightFetch[]\n}\n\nexport type RequestInsightsSnapshot = {\n requests: RequestInsight[]\n}\n"],"names":["getRequestInsightKey","getRequestInsightKind"],"mappings":"AAEA,SACEA,oBAAoB,EACpBC,qBAAqB,QAGhB,oCAAmC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/stack-frame.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/stack-frame.js
new file mode 100644
index 0000000000000000000000000000000000000000..d070268b217676104f35675d00db62129de42937
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/stack-frame.js
@@ -0,0 +1,116 @@
+import { isWebpackInternalResource, formatStackFrameFile } from './webpack-module-path';
+function getOriginalStackFrame(source, response) {
+ async function _getOriginalStackFrame() {
+ if (response.status === 'rejected') {
+ throw new Error(response.reason);
+ }
+ const body = response.value;
+ return {
+ error: false,
+ reason: null,
+ external: false,
+ sourceStackFrame: source,
+ originalStackFrame: body.originalStackFrame,
+ originalCodeFrame: body.originalCodeFrame || null,
+ ignored: body.originalStackFrame?.ignored || false
+ };
+ }
+ // TODO: merge this section into ignoredList handling
+ if (source.file === 'file://' || source.file?.match(/https?:\/\//)) {
+ return Promise.resolve({
+ error: false,
+ reason: null,
+ external: true,
+ sourceStackFrame: source,
+ originalStackFrame: null,
+ originalCodeFrame: null,
+ ignored: true
+ });
+ }
+ return _getOriginalStackFrame().catch((err)=>({
+ error: true,
+ reason: err?.message ?? err?.toString() ?? 'Unknown Error',
+ external: false,
+ sourceStackFrame: source,
+ originalStackFrame: null,
+ originalCodeFrame: null,
+ ignored: false
+ }));
+}
+export async function getOriginalStackFrames(frames, type, isAppDir) {
+ const req = {
+ frames,
+ isServer: type === 'server',
+ isEdgeServer: type === 'edge-server',
+ isAppDirectory: isAppDir
+ };
+ let res = undefined;
+ let reason = undefined;
+ try {
+ res = await fetch('/__nextjs_original-stack-frames', {
+ method: 'POST',
+ body: JSON.stringify(req)
+ });
+ } catch (e) {
+ reason = e + '';
+ }
+ // When fails to fetch the original stack frames, we reject here to be
+ // caught at `_getOriginalStackFrame()` and return the stack frames so
+ // that the error overlay can render.
+ if (res && res.ok && res.status !== 204) {
+ const data = await res.json();
+ return Promise.all(frames.map((frame, index)=>getOriginalStackFrame(frame, data[index])));
+ } else {
+ if (res) {
+ reason = await res.text();
+ }
+ }
+ return Promise.all(frames.map((frame)=>getOriginalStackFrame(frame, {
+ status: 'rejected',
+ reason: `Failed to fetch the original stack frames ${reason ? `: ${reason}` : ''}`
+ })));
+}
+export function getStackFrameFile(frame) {
+ if (!frame.file) return '';
+ const isWebpackFrame = isWebpackInternalResource(frame.file);
+ let str = '';
+ // Skip URL parsing for webpack internal file paths.
+ if (isWebpackFrame) {
+ str = formatStackFrameFile(frame.file);
+ } else {
+ try {
+ const u = new URL(frame.file);
+ let parsedPath = '';
+ // Strip the origin for same-origin scripts.
+ if (globalThis.location?.origin !== u.origin) {
+ // URLs can be valid without an `origin`, so long as they have a
+ // `protocol`. However, `origin` is preferred.
+ if (u.origin === 'null') {
+ parsedPath += u.protocol;
+ } else {
+ parsedPath += u.origin;
+ }
+ }
+ // Strip query string information as it's typically too verbose to be
+ // meaningful.
+ parsedPath += u.pathname;
+ str = formatStackFrameFile(parsedPath);
+ } catch {
+ str = formatStackFrameFile(frame.file);
+ }
+ }
+ if (!isWebpackInternalResource(frame.file) && frame.line1 != null) {
+ // We don't need line and column numbers for anonymous sources because
+ // there's no entrypoint for the location anyway.
+ if (str && frame.file !== '') {
+ if (frame.column1 != null) {
+ str += ` (${frame.line1}:${frame.column1})`;
+ } else {
+ str += ` (${frame.line1})`;
+ }
+ }
+ }
+ return str;
+}
+
+//# sourceMappingURL=stack-frame.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/stack-frame.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/stack-frame.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..243f5018b78837a6f6a283f44f2764a89c220069
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/stack-frame.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/stack-frame.ts"],"sourcesContent":["import type {\n OriginalStackFrameResponse,\n OriginalStackFrameResponseResult,\n OriginalStackFramesRequest,\n StackFrame,\n} from '../server/shared'\nimport {\n isWebpackInternalResource,\n formatStackFrameFile,\n} from './webpack-module-path'\n\nexport type { StackFrame }\n\ninterface ResolvedOriginalStackFrame extends OriginalStackFrameResponse {\n error: false\n reason: null\n external: boolean\n ignored: boolean\n sourceStackFrame: StackFrame\n}\n\ninterface RejectedOriginalStackFrame extends OriginalStackFrameResponse {\n error: true\n reason: string\n external: boolean\n ignored: boolean\n sourceStackFrame: StackFrame\n}\n\nexport type OriginalStackFrame =\n | ResolvedOriginalStackFrame\n | RejectedOriginalStackFrame\n\nfunction getOriginalStackFrame(\n source: StackFrame,\n response: OriginalStackFrameResponseResult\n): Promise {\n async function _getOriginalStackFrame(): Promise {\n if (response.status === 'rejected') {\n throw new Error(response.reason)\n }\n\n const body: OriginalStackFrameResponse = response.value\n\n return {\n error: false,\n reason: null,\n external: false,\n sourceStackFrame: source,\n originalStackFrame: body.originalStackFrame,\n originalCodeFrame: body.originalCodeFrame || null,\n ignored: body.originalStackFrame?.ignored || false,\n }\n }\n\n // TODO: merge this section into ignoredList handling\n if (source.file === 'file://' || source.file?.match(/https?:\\/\\//)) {\n return Promise.resolve({\n error: false,\n reason: null,\n external: true,\n sourceStackFrame: source,\n originalStackFrame: null,\n originalCodeFrame: null,\n ignored: true,\n })\n }\n\n return _getOriginalStackFrame().catch(\n (err: Error): RejectedOriginalStackFrame => ({\n error: true,\n reason: err?.message ?? err?.toString() ?? 'Unknown Error',\n external: false,\n sourceStackFrame: source,\n originalStackFrame: null,\n originalCodeFrame: null,\n ignored: false,\n })\n )\n}\n\nexport async function getOriginalStackFrames(\n frames: readonly StackFrame[],\n type: 'server' | 'edge-server' | null,\n isAppDir: boolean\n): Promise {\n const req: OriginalStackFramesRequest = {\n frames,\n isServer: type === 'server',\n isEdgeServer: type === 'edge-server',\n isAppDirectory: isAppDir,\n }\n\n let res: Response | undefined = undefined\n let reason: string | undefined = undefined\n try {\n res = await fetch('/__nextjs_original-stack-frames', {\n method: 'POST',\n body: JSON.stringify(req),\n })\n } catch (e) {\n reason = e + ''\n }\n\n // When fails to fetch the original stack frames, we reject here to be\n // caught at `_getOriginalStackFrame()` and return the stack frames so\n // that the error overlay can render.\n if (res && res.ok && res.status !== 204) {\n const data = await res.json()\n return Promise.all(\n frames.map((frame, index) => getOriginalStackFrame(frame, data[index]))\n )\n } else {\n if (res) {\n reason = await res.text()\n }\n }\n return Promise.all(\n frames.map((frame) =>\n getOriginalStackFrame(frame, {\n status: 'rejected',\n reason: `Failed to fetch the original stack frames ${reason ? `: ${reason}` : ''}`,\n })\n )\n )\n}\n\nexport function getStackFrameFile(frame: StackFrame): string {\n if (!frame.file) return ''\n\n const isWebpackFrame = isWebpackInternalResource(frame.file)\n\n let str = ''\n // Skip URL parsing for webpack internal file paths.\n if (isWebpackFrame) {\n str = formatStackFrameFile(frame.file)\n } else {\n try {\n const u = new URL(frame.file)\n\n let parsedPath = ''\n // Strip the origin for same-origin scripts.\n if (globalThis.location?.origin !== u.origin) {\n // URLs can be valid without an `origin`, so long as they have a\n // `protocol`. However, `origin` is preferred.\n if (u.origin === 'null') {\n parsedPath += u.protocol\n } else {\n parsedPath += u.origin\n }\n }\n\n // Strip query string information as it's typically too verbose to be\n // meaningful.\n parsedPath += u.pathname\n str = formatStackFrameFile(parsedPath)\n } catch {\n str = formatStackFrameFile(frame.file)\n }\n }\n\n if (!isWebpackInternalResource(frame.file) && frame.line1 != null) {\n // We don't need line and column numbers for anonymous sources because\n // there's no entrypoint for the location anyway.\n if (str && frame.file !== '') {\n if (frame.column1 != null) {\n str += ` (${frame.line1}:${frame.column1})`\n } else {\n str += ` (${frame.line1})`\n }\n }\n }\n return str\n}\n"],"names":["isWebpackInternalResource","formatStackFrameFile","getOriginalStackFrame","source","response","_getOriginalStackFrame","status","Error","reason","body","value","error","external","sourceStackFrame","originalStackFrame","originalCodeFrame","ignored","file","match","Promise","resolve","catch","err","message","toString","getOriginalStackFrames","frames","type","isAppDir","req","isServer","isEdgeServer","isAppDirectory","res","undefined","fetch","method","JSON","stringify","e","ok","data","json","all","map","frame","index","text","getStackFrameFile","isWebpackFrame","str","u","URL","parsedPath","globalThis","location","origin","protocol","pathname","line1","column1"],"mappings":"AAMA,SACEA,yBAAyB,EACzBC,oBAAoB,QACf,wBAAuB;AAwB9B,SAASC,sBACPC,MAAkB,EAClBC,QAA0C;IAE1C,eAAeC;QACb,IAAID,SAASE,MAAM,KAAK,YAAY;YAClC,MAAM,IAAIC,MAAMH,SAASI,MAAM;QACjC;QAEA,MAAMC,OAAmCL,SAASM,KAAK;QAEvD,OAAO;YACLC,OAAO;YACPH,QAAQ;YACRI,UAAU;YACVC,kBAAkBV;YAClBW,oBAAoBL,KAAKK,kBAAkB;YAC3CC,mBAAmBN,KAAKM,iBAAiB,IAAI;YAC7CC,SAASP,KAAKK,kBAAkB,EAAEE,WAAW;QAC/C;IACF;IAEA,qDAAqD;IACrD,IAAIb,OAAOc,IAAI,KAAK,aAAad,OAAOc,IAAI,EAAEC,MAAM,gBAAgB;QAClE,OAAOC,QAAQC,OAAO,CAAC;YACrBT,OAAO;YACPH,QAAQ;YACRI,UAAU;YACVC,kBAAkBV;YAClBW,oBAAoB;YACpBC,mBAAmB;YACnBC,SAAS;QACX;IACF;IAEA,OAAOX,yBAAyBgB,KAAK,CACnC,CAACC,MAA4C,CAAA;YAC3CX,OAAO;YACPH,QAAQc,KAAKC,WAAWD,KAAKE,cAAc;YAC3CZ,UAAU;YACVC,kBAAkBV;YAClBW,oBAAoB;YACpBC,mBAAmB;YACnBC,SAAS;QACX,CAAA;AAEJ;AAEA,OAAO,eAAeS,uBACpBC,MAA6B,EAC7BC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EAAEK,MAAM,EAAE;gBAC5C,gEAAgE;gBAChE,8CAA8C;gBAC9C,IAAIL,EAAEK,MAAM,KAAK,QAAQ;oBACvBH,cAAcF,EAAEM,QAAQ;gBAC1B,OAAO;oBACLJ,cAAcF,EAAEK,MAAM;gBACxB;YACF;YAEA,qEAAqE;YACrE,cAAc;YACdH,cAAcF,EAAEO,QAAQ;YACxBR,MAAMjD,qBAAqBoD;QAC7B,EAAE,OAAM;YACNH,MAAMjD,qBAAqB4C,MAAM5B,IAAI;QACvC;IACF;IAEA,IAAI,CAACjB,0BAA0B6C,MAAM5B,IAAI,KAAK4B,MAAMc,KAAK,IAAI,MAAM;QACjE,sEAAsE;QACtE,iDAAiD;QACjD,IAAIT,OAAOL,MAAM5B,IAAI,KAAK,eAAe;YACvC,IAAI4B,MAAMe,OAAO,IAAI,MAAM;gBACzBV,OAAO,CAAC,EAAE,EAAEL,MAAMc,KAAK,CAAC,CAAC,EAAEd,MAAMe,OAAO,CAAC,CAAC,CAAC;YAC7C,OAAO;gBACLV,OAAO,CAAC,EAAE,EAAEL,MAAMc,KAAK,CAAC,CAAC,CAAC;YAC5B;QACF;IACF;IACA,OAAOT;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/types.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..71d3002375c021de8e09dbfb6ce8af55cd2a5a82
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/types.js
@@ -0,0 +1,3 @@
+export { };
+
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/types.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/types.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..f0f3ded82654de77a422d91f45e9c8984de078bd
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/types.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/types.ts"],"sourcesContent":["export type DebugInfo = {\n devtoolsFrontendUrl: string | undefined\n}\n"],"names":[],"mappings":"AAAA,WAEC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/version-staleness.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/version-staleness.js
new file mode 100644
index 0000000000000000000000000000000000000000..3e1082cd2c9c7a8635b453b1e1a4b64df91047f7
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/version-staleness.js
@@ -0,0 +1,48 @@
+export function getStaleness({ installed, staleness, expected }) {
+ let text = '';
+ let title = '';
+ let indicatorClass = '';
+ const versionLabel = `Next.js ${installed}`;
+ switch(staleness){
+ case 'newer-than-npm':
+ case 'fresh':
+ text = versionLabel;
+ title = `Latest available version is detected (${installed}).`;
+ indicatorClass = 'fresh';
+ break;
+ case 'stale-patch':
+ case 'stale-minor':
+ text = `${versionLabel} (stale)`;
+ title = `There is a newer version (${expected}) available, upgrade recommended! `;
+ indicatorClass = 'stale';
+ break;
+ case 'stale-major':
+ {
+ text = `${versionLabel} (outdated)`;
+ title = `An outdated version detected (latest is ${expected}), upgrade is highly recommended!`;
+ indicatorClass = 'outdated';
+ break;
+ }
+ case 'stale-prerelease':
+ {
+ text = `${versionLabel} (stale)`;
+ title = `There is a newer canary version (${expected}) available, please upgrade! `;
+ indicatorClass = 'stale';
+ break;
+ }
+ case 'unknown':
+ text = `${versionLabel} (unknown)`;
+ title = 'No Next.js version data was found.';
+ indicatorClass = 'unknown';
+ break;
+ default:
+ break;
+ }
+ return {
+ text,
+ indicatorClass,
+ title
+ };
+}
+
+//# sourceMappingURL=version-staleness.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/version-staleness.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/version-staleness.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..291f049a504f2b5e4c782a9cfe159ad19242335c
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/version-staleness.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/version-staleness.ts"],"sourcesContent":["import type { VersionInfo } from '../../server/dev/parse-version-info'\n\nexport function getStaleness({ installed, staleness, expected }: VersionInfo) {\n let text = ''\n let title = ''\n let indicatorClass = ''\n const versionLabel = `Next.js ${installed}`\n switch (staleness) {\n case 'newer-than-npm':\n case 'fresh':\n text = versionLabel\n title = `Latest available version is detected (${installed}).`\n indicatorClass = 'fresh'\n break\n case 'stale-patch':\n case 'stale-minor':\n text = `${versionLabel} (stale)`\n title = `There is a newer version (${expected}) available, upgrade recommended! `\n indicatorClass = 'stale'\n break\n case 'stale-major': {\n text = `${versionLabel} (outdated)`\n title = `An outdated version detected (latest is ${expected}), upgrade is highly recommended!`\n indicatorClass = 'outdated'\n break\n }\n case 'stale-prerelease': {\n text = `${versionLabel} (stale)`\n title = `There is a newer canary version (${expected}) available, please upgrade! `\n indicatorClass = 'stale'\n break\n }\n case 'unknown':\n text = `${versionLabel} (unknown)`\n title = 'No Next.js version data was found.'\n indicatorClass = 'unknown'\n break\n default:\n break\n }\n return { text, indicatorClass, title }\n}\n"],"names":["getStaleness","installed","staleness","expected","text","title","indicatorClass","versionLabel"],"mappings":"AAEA,OAAO,SAASA,aAAa,EAAEC,SAAS,EAAEC,SAAS,EAAEC,QAAQ,EAAe;IAC1E,IAAIC,OAAO;IACX,IAAIC,QAAQ;IACZ,IAAIC,iBAAiB;IACrB,MAAMC,eAAe,CAAC,QAAQ,EAAEN,WAAW;IAC3C,OAAQC;QACN,KAAK;QACL,KAAK;YACHE,OAAOG;YACPF,QAAQ,CAAC,sCAAsC,EAAEJ,UAAU,EAAE,CAAC;YAC9DK,iBAAiB;YACjB;QACF,KAAK;QACL,KAAK;YACHF,OAAO,GAAGG,aAAa,QAAQ,CAAC;YAChCF,QAAQ,CAAC,0BAA0B,EAAEF,SAAS,kCAAkC,CAAC;YACjFG,iBAAiB;YACjB;QACF,KAAK;YAAe;gBAClBF,OAAO,GAAGG,aAAa,WAAW,CAAC;gBACnCF,QAAQ,CAAC,wCAAwC,EAAEF,SAAS,iCAAiC,CAAC;gBAC9FG,iBAAiB;gBACjB;YACF;QACA,KAAK;YAAoB;gBACvBF,OAAO,GAAGG,aAAa,QAAQ,CAAC;gBAChCF,QAAQ,CAAC,iCAAiC,EAAEF,SAAS,6BAA6B,CAAC;gBACnFG,iBAAiB;gBACjB;YACF;QACA,KAAK;YACHF,OAAO,GAAGG,aAAa,UAAU,CAAC;YAClCF,QAAQ;YACRC,iBAAiB;YACjB;QACF;YACE;IACJ;IACA,OAAO;QAAEF;QAAME;QAAgBD;IAAM;AACvC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/webpack-module-path.js b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/webpack-module-path.js
new file mode 100644
index 0000000000000000000000000000000000000000..ab545f60683e7fafd0b96fdff6454d5bf997d75e
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/webpack-module-path.js
@@ -0,0 +1,26 @@
+const replacementRegExes = [
+ /^webpack-internal:\/\/\/(\([\w-]+\)\/)?/,
+ /^(webpack:\/\/\/|webpack:\/\/(_N_E\/)?)(\([\w-]+\)\/)?/
+];
+export function isWebpackInternalResource(file) {
+ for (const regex of replacementRegExes){
+ if (regex.test(file)) return true;
+ file = file.replace(regex, '');
+ }
+ return false;
+}
+/**
+ * Format the webpack internal id to original file path
+ *
+ * webpack-internal:///./src/hello.tsx => ./src/hello.tsx
+ * webpack://_N_E/./src/hello.tsx => ./src/hello.tsx
+ * webpack://./src/hello.tsx => ./src/hello.tsx
+ * webpack:///./src/hello.tsx => ./src/hello.tsx
+ */ export function formatStackFrameFile(file) {
+ for (const regex of replacementRegExes){
+ file = file.replace(regex, '');
+ }
+ return file;
+}
+
+//# sourceMappingURL=webpack-module-path.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/shared/webpack-module-path.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/webpack-module-path.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..78df1e7ac47bdf7d11291fd5d034d1c3f4c932d5
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/shared/webpack-module-path.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../src/next-devtools/shared/webpack-module-path.ts"],"sourcesContent":["const replacementRegExes = [\n /^webpack-internal:\\/\\/\\/(\\([\\w-]+\\)\\/)?/,\n /^(webpack:\\/\\/\\/|webpack:\\/\\/(_N_E\\/)?)(\\([\\w-]+\\)\\/)?/,\n]\n\nexport function isWebpackInternalResource(file: string) {\n for (const regex of replacementRegExes) {\n if (regex.test(file)) return true\n\n file = file.replace(regex, '')\n }\n\n return false\n}\n\n/**\n * Format the webpack internal id to original file path\n *\n * webpack-internal:///./src/hello.tsx => ./src/hello.tsx\n * webpack://_N_E/./src/hello.tsx => ./src/hello.tsx\n * webpack://./src/hello.tsx => ./src/hello.tsx\n * webpack:///./src/hello.tsx => ./src/hello.tsx\n */\nexport function formatStackFrameFile(file: string) {\n for (const regex of replacementRegExes) {\n file = file.replace(regex, '')\n }\n\n return file\n}\n"],"names":["replacementRegExes","isWebpackInternalResource","file","regex","test","replace","formatStackFrameFile"],"mappings":"AAAA,MAAMA,qBAAqB;IACzB;IACA;CACD;AAED,OAAO,SAASC,0BAA0BC,IAAY;IACpD,KAAK,MAAMC,SAASH,mBAAoB;QACtC,IAAIG,MAAMC,IAAI,CAACF,OAAO,OAAO;QAE7BA,OAAOA,KAAKG,OAAO,CAACF,OAAO;IAC7B;IAEA,OAAO;AACT;AAEA;;;;;;;CAOC,GACD,OAAO,SAASG,qBAAqBJ,IAAY;IAC/C,KAAK,MAAMC,SAASH,mBAAoB;QACtCE,OAAOA,KAAKG,OAAO,CAACF,OAAO;IAC7B;IAEA,OAAOD;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-error-boundary.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-error-boundary.js
new file mode 100644
index 0000000000000000000000000000000000000000..1c9d464e044c156ce442dc7d1afcdbe35b4d0054
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-error-boundary.js
@@ -0,0 +1,71 @@
+import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
+import React, { PureComponent, startTransition } from 'react';
+import { dispatcher } from 'next/dist/compiled/next-devtools';
+import { RuntimeErrorHandler } from '../../../client/dev/runtime-error-handler';
+import { ErrorBoundary } from '../../../client/components/error-boundary';
+import DefaultGlobalError from '../../../client/components/builtin/global-error';
+import { SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE } from './segment-explorer-node';
+import { AppRouterContext } from '../../../shared/lib/app-router-context.shared-runtime';
+import isError from '../../../lib/is-error';
+function ErroredHtml({ globalError: [GlobalError, globalErrorStyles], thrownValue, reset, retry }) {
+ return /*#__PURE__*/ _jsxs(ErrorBoundary, {
+ errorComponent: DefaultGlobalError,
+ children: [
+ globalErrorStyles,
+ /*#__PURE__*/ _jsx(GlobalError, {
+ error: thrownValue,
+ reset: reset,
+ retry: retry
+ })
+ ]
+ });
+}
+export class AppDevOverlayErrorBoundary extends PureComponent {
+ static{
+ this.contextType = AppRouterContext;
+ }
+ static getDerivedStateFromError(thrownValue) {
+ RuntimeErrorHandler.hadRuntimeError = true;
+ return {
+ error: {
+ thrownValue
+ }
+ };
+ }
+ componentDidCatch(err) {
+ if (process.env.NODE_ENV === 'development' && isError(err) && err.message === SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE) {
+ return;
+ }
+ dispatcher.openErrorOverlay();
+ }
+ render() {
+ const { children, globalError } = this.props;
+ const { error } = this.state;
+ if (error !== null) {
+ const thrownValue = error.thrownValue;
+ return /*#__PURE__*/ _jsx(ErroredHtml, {
+ globalError: globalError,
+ thrownValue: thrownValue,
+ reset: this.reset,
+ retry: this.retry
+ });
+ }
+ return children;
+ }
+ constructor(...args){
+ super(...args), this.state = {
+ error: null
+ }, this.retry = ()=>{
+ startTransition(()=>{
+ this.context?.refresh();
+ this.reset();
+ });
+ }, this.reset = ()=>{
+ this.setState({
+ error: null
+ });
+ };
+ }
+}
+
+//# sourceMappingURL=app-dev-overlay-error-boundary.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-error-boundary.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-error-boundary.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..91420ca5f9963e9d6869cbeb3502e368d94beee4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-error-boundary.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/userspace/app/app-dev-overlay-error-boundary.tsx"],"sourcesContent":["import React, { PureComponent, startTransition } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { RuntimeErrorHandler } from '../../../client/dev/runtime-error-handler'\nimport { ErrorBoundary } from '../../../client/components/error-boundary'\nimport DefaultGlobalError from '../../../client/components/builtin/global-error'\nimport type { GlobalErrorState } from '../../../client/components/app-router-instance'\nimport { SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE } from './segment-explorer-node'\nimport {\n AppRouterContext,\n type AppRouterInstance,\n} from '../../../shared/lib/app-router-context.shared-runtime'\nimport isError from '../../../lib/is-error'\n\ntype AppDevOverlayErrorBoundaryProps = {\n children: React.ReactNode\n globalError: GlobalErrorState\n}\n\ntype AppDevOverlayErrorBoundaryState = {\n error: null | { thrownValue: unknown }\n}\n\nfunction ErroredHtml({\n globalError: [GlobalError, globalErrorStyles],\n thrownValue,\n reset,\n retry,\n}: {\n globalError: GlobalErrorState\n thrownValue: unknown\n reset: () => void\n retry: () => void\n}) {\n return (\n \n {globalErrorStyles}\n \n \n )\n}\n\nexport class AppDevOverlayErrorBoundary extends PureComponent<\n AppDevOverlayErrorBoundaryProps,\n AppDevOverlayErrorBoundaryState\n> {\n static contextType = AppRouterContext\n declare context: AppRouterInstance | null\n\n state: AppDevOverlayErrorBoundaryState = {\n error: null,\n }\n\n static getDerivedStateFromError(\n thrownValue: Error\n ): Partial {\n RuntimeErrorHandler.hadRuntimeError = true\n\n return {\n error: { thrownValue },\n }\n }\n\n componentDidCatch(err: unknown) {\n if (\n process.env.NODE_ENV === 'development' &&\n isError(err) &&\n err.message === SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE\n ) {\n return\n }\n dispatcher.openErrorOverlay()\n }\n\n retry = () => {\n startTransition(() => {\n this.context?.refresh()\n this.reset()\n })\n }\n\n reset = () => {\n this.setState({ error: null })\n }\n\n render() {\n const { children, globalError } = this.props\n const { error } = this.state\n\n if (error !== null) {\n const thrownValue = error.thrownValue\n return (\n \n )\n }\n\n return children\n }\n}\n"],"names":["React","PureComponent","startTransition","dispatcher","RuntimeErrorHandler","ErrorBoundary","DefaultGlobalError","SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE","AppRouterContext","isError","ErroredHtml","globalError","GlobalError","globalErrorStyles","thrownValue","reset","retry","errorComponent","error","AppDevOverlayErrorBoundary","contextType","getDerivedStateFromError","hadRuntimeError","componentDidCatch","err","process","env","NODE_ENV","message","openErrorOverlay","render","children","props","state","context","refresh","setState"],"mappings":";AAAA,OAAOA,SAASC,aAAa,EAAEC,eAAe,QAAQ,QAAO;AAC7D,SAASC,UAAU,QAAQ,mCAAkC;AAC7D,SAASC,mBAAmB,QAAQ,4CAA2C;AAC/E,SAASC,aAAa,QAAQ,4CAA2C;AACzE,OAAOC,wBAAwB,kDAAiD;AAEhF,SAASC,wCAAwC,QAAQ,0BAA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m/next-devtools/userspace/app/app-dev-overlay-setup.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-setup.js
new file mode 100644
index 0000000000000000000000000000000000000000..8b09f995d64faaf0446a5f48148a4ede591159de
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-setup.js
@@ -0,0 +1,8 @@
+import { patchConsoleError } from './errors/intercept-console-error';
+import { handleGlobalErrors } from './errors/use-error-handler';
+import { initializeDebugLogForwarding } from './forward-logs';
+handleGlobalErrors();
+patchConsoleError();
+initializeDebugLogForwarding('app');
+
+//# sourceMappingURL=app-dev-overlay-setup.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-setup.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-setup.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..f4e034c324674aeba426d87c1b949310d3340eb0
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/app-dev-overlay-setup.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/userspace/app/app-dev-overlay-setup.ts"],"sourcesContent":["import { patchConsoleError } from './errors/intercept-console-error'\nimport { handleGlobalErrors } from './errors/use-error-handler'\nimport { initializeDebugLogForwarding } from './forward-logs'\n\nhandleGlobalErrors()\npatchConsoleError()\n\ninitializeDebugLogForwarding('app')\n"],"names":["patchConsoleError","handleGlobalErrors","initializeDebugLogForwarding"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,mCAAkC;AACpE,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SAASC,4BAA4B,QAAQ,iBAAgB;AAE7DD;AACAD;AAEAE,6BAA6B","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/client-entry.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/client-entry.js
new file mode 100644
index 0000000000000000000000000000000000000000..c2c276986add0ff0c24bdf9735469706ca8bcc1f
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/client-entry.js
@@ -0,0 +1,17 @@
+import { jsx as _jsx } from "react/jsx-runtime";
+import React from 'react';
+import DefaultGlobalError from '../../../client/components/builtin/global-error';
+import { AppDevOverlayErrorBoundary } from './app-dev-overlay-error-boundary';
+// If an error is thrown while rendering an RSC stream, this will catch it in
+// dev and show the error overlay.
+export function RootLevelDevOverlayElement({ children }) {
+ return /*#__PURE__*/ _jsx(AppDevOverlayErrorBoundary, {
+ globalError: [
+ DefaultGlobalError,
+ null
+ ],
+ children: children
+ });
+}
+
+//# sourceMappingURL=client-entry.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/client-entry.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/client-entry.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..a91dca5071c6eed4fab78bd3e0ce6a0bdef2e13d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/client-entry.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/userspace/app/client-entry.tsx"],"sourcesContent":["import React from 'react'\nimport DefaultGlobalError from '../../../client/components/builtin/global-error'\nimport { AppDevOverlayErrorBoundary } from './app-dev-overlay-error-boundary'\n\n// If an error is thrown while rendering an RSC stream, this will catch it in\n// dev and show the error overlay.\nexport function RootLevelDevOverlayElement({\n children,\n}: {\n children: React.ReactNode\n}) {\n return (\n \n {children}\n \n )\n}\n"],"names":["React","DefaultGlobalError","AppDevOverlayErrorBoundary","RootLevelDevOverlayElement","children","globalError"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AACzB,OAAOC,wBAAwB,kDAAiD;AAChF,SAASC,0BAA0B,QAAQ,mCAAkC;AAE7E,6EAA6E;AAC7E,kCAAkC;AAClC,OAAO,SAASC,2BAA2B,EACzCC,QAAQ,EAGT;IACC,qBACE,KAACF;QAA2BG,aAAa;YAACJ;YAAoB;SAAK;kBAChEG;;AAGP","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/index.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..215c1f6da2a5e63ab5714f6884eba80dc7d86b4f
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/index.js
@@ -0,0 +1,5 @@
+export { originConsoleError } from './intercept-console-error';
+export { handleClientError } from './use-error-handler';
+export { decorateDevError } from './stitched-error';
+
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/index.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/index.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..6805ff973c2f2814892622504b009996988d55b9
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../../src/next-devtools/userspace/app/errors/index.ts"],"sourcesContent":["export { originConsoleError } from './intercept-console-error'\nexport { handleClientError } from './use-error-handler'\nexport { decorateDevError } from './stitched-error'\n"],"names":["originConsoleError","handleClientError","decorateDevError"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,4BAA2B;AAC9D,SAASC,iBAAiB,QAAQ,sBAAqB;AACvD,SAASC,gBAAgB,QAAQ,mBAAkB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/intercept-console-error.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/intercept-console-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..79baad2e8a7026062502c6daca9a3d3a3ce632d8
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/intercept-console-error.js
@@ -0,0 +1,46 @@
+import isError from '../../../../lib/is-error';
+import { isNextRouterError } from '../../../../client/components/is-next-router-error';
+import { handleConsoleError } from './use-error-handler';
+import { parseConsoleArgs } from '../../../../client/lib/console';
+import { forwardErrorLog } from '../forward-logs';
+export const originConsoleError = globalThis.console.error;
+// Patch console.error to collect information about hydration errors
+export function patchConsoleError() {
+ // Ensure it's only patched once
+ if (typeof window === 'undefined') {
+ return;
+ }
+ window.console.error = function error(...args) {
+ let maybeError;
+ let isReplayedLog = false;
+ if (process.env.NODE_ENV !== 'production') {
+ const { error: replayedError, environmentName } = parseConsoleArgs(args);
+ // If environmentName is set, this is a server log replayed by React in the browser
+ isReplayedLog = !!environmentName;
+ if (replayedError) {
+ maybeError = replayedError;
+ } else if (isError(args[0])) {
+ maybeError = args[0];
+ } else {
+ // See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78
+ maybeError = args[1];
+ }
+ } else {
+ maybeError = args[0];
+ }
+ if (!isNextRouterError(maybeError)) {
+ if (process.env.NODE_ENV !== 'production') {
+ handleConsoleError(// replayed errors have their own complex format string that should be used,
+ // but if we pass the error directly, `handleClientError` will ignore it
+ maybeError, args);
+ }
+ // Don't forward replayed server logs to terminal - they were already logged on the server
+ if (!isReplayedLog) {
+ forwardErrorLog(args);
+ }
+ originConsoleError.apply(window.console, args);
+ }
+ };
+}
+
+//# sourceMappingURL=intercept-console-error.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/intercept-console-error.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/intercept-console-error.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..0b5fbf6f13101e351af3963fd84e5805e5f9587e
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/intercept-console-error.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../../src/next-devtools/userspace/app/errors/intercept-console-error.ts"],"sourcesContent":["import isError from '../../../../lib/is-error'\nimport { isNextRouterError } from '../../../../client/components/is-next-router-error'\nimport { handleConsoleError } from './use-error-handler'\nimport { parseConsoleArgs } from '../../../../client/lib/console'\nimport { forwardErrorLog } from '../forward-logs'\n\nexport const originConsoleError = globalThis.console.error\n\n// Patch console.error to collect information about hydration errors\nexport function patchConsoleError() {\n // Ensure it's only patched once\n if (typeof window === 'undefined') {\n return\n }\n window.console.error = function error(...args: any[]) {\n let maybeError: unknown\n let isReplayedLog = false\n if (process.env.NODE_ENV !== 'production') {\n const { error: replayedError, environmentName } = parseConsoleArgs(args)\n // If environmentName is set, this is a server log replayed by React in the browser\n isReplayedLog = !!environmentName\n if (replayedError) {\n maybeError = replayedError\n } else if (isError(args[0])) {\n maybeError = args[0]\n } else {\n // See https://github.com/facebook/react/blob/d50323eb845c5fde0d720cae888bf35dedd05506/packages/react-reconciler/src/ReactFiberErrorLogger.js#L78\n maybeError = args[1]\n }\n } else {\n maybeError = args[0]\n }\n\n if (!isNextRouterError(maybeError)) {\n if (process.env.NODE_ENV !== 'production') {\n handleConsoleError(\n // replayed errors have their own complex format string that should be used,\n // but if we pass the error directly, `handleClientError` will ignore it\n maybeError,\n args\n )\n }\n // Don't forward replayed server logs to terminal - they were already logged on the server\n if (!isReplayedLog) {\n forwardErrorLog(args)\n }\n\n originConsoleError.apply(window.console, args)\n }\n }\n}\n"],"names":["isError","isNextRouterError","handleConsoleError","parseConsoleArgs","forwardErrorLog","originConsoleError","globalThis","console","error","patchConsoleError","window","args","maybeError","isReplayedLog","process","env","NODE_ENV","replayedError","environmentName","apply"],"mappings":"AAAA,OAAOA,aAAa,2BAA0B;AAC9C,SAASC,iBAAiB,QAAQ,qDAAoD;AACtF,SAASC,kBAAkB,QAAQ,sBAAqB;AACxD,SAASC,gBAAgB,QAAQ,iCAAgC;AACjE,SAASC,eAAe,QAAQ,kBAAiB;AAEjD,OAAO,MAAMC,qBAAqBC,WAAWC,OAAO,CAACC,KAAK,CAAA;AAE1D,oEAAoE;AACpE,OAAO,SAASC;IACd,gCAAgC;IAChC,IAAI,OAAOC,WAAW,aAAa;QACjC;IACF;IACAA,OAAOH,OAAO,CAACC,KAAK,GAAG,SAASA,MAAM,GAAGG,IAAW;QAClD,IAAIC;QACJ,IAAIC,gBAAgB;QACpB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YACzC,MAAM,EAAER,OAAOS,aAAa,EAAEC,eAAe,EAAE,GAAGf,iBAAiBQ;YACnE,mFAAmF;YACnFE,gBAAgB,CAAC,CAACK;YAClB,IAAID,eAAe;gBACjBL,aAAaK;YACf,OAAO,IAAIjB,QAAQW,IAAI,CAAC,EAAE,GAAG;gBAC3BC,aAAaD,IAAI,CAAC,EAAE;YACtB,OAAO;gBACL,iJAAiJ;gBACjJC,aAAaD,IAAI,CAAC,EAAE;YACtB;QACF,OAAO;YACLC,aAAaD,IAAI,CAAC,EAAE;QACtB;QAEA,IAAI,CAACV,kBAAkBW,aAAa;YAClC,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;gBACzCd,mBACE,4EAA4E;gBAC5E,wEAAwE;gBACxEU,YACAD;YAEJ;YACA,0FAA0F;YAC1F,IAAI,CAACE,eAAe;gBAClBT,gBAAgBO;YAClB;YAEAN,mBAAmBc,KAAK,CAACT,OAAOH,OAAO,EAAEI;QAC3C;IACF;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/replay-ssr-only-errors.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/replay-ssr-only-errors.js
new file mode 100644
index 0000000000000000000000000000000000000000..e07964d2b51ee956cc3e8434dab1f3583bf84fff
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/replay-ssr-only-errors.js
@@ -0,0 +1,56 @@
+import { useEffect } from 'react';
+import { handleClientError } from './use-error-handler';
+import { isNextRouterError } from '../../../../client/components/is-next-router-error';
+import { MISSING_ROOT_TAGS_ERROR } from '../../../../shared/lib/errors/constants';
+function readSsrError() {
+ if (typeof document === 'undefined') {
+ return null;
+ }
+ const ssrErrorTemplateTag = document.querySelector('template[data-next-error-message]');
+ if (ssrErrorTemplateTag) {
+ const message = ssrErrorTemplateTag.getAttribute('data-next-error-message');
+ const stack = ssrErrorTemplateTag.getAttribute('data-next-error-stack');
+ const digest = ssrErrorTemplateTag.getAttribute('data-next-error-digest');
+ const error = new Error(message);
+ if (digest) {
+ ;
+ error.digest = digest;
+ }
+ // Skip Next.js SSR'd internal errors that which will be handled by the error boundaries.
+ if (isNextRouterError(error)) {
+ return null;
+ }
+ error.stack = stack || '';
+ return error;
+ }
+ return null;
+}
+/**
+ * Needs to be in the same error boundary as the shell.
+ * If it commits, we know we recovered from an SSR error.
+ * If it doesn't commit, we errored again and React will take care of error reporting.
+ */ export function ReplaySsrOnlyErrors({ onBlockingError }) {
+ if (process.env.NODE_ENV !== 'production') {
+ // Need to read during render. The attributes will be gone after commit.
+ const ssrError = readSsrError();
+ // eslint-disable-next-line react-hooks/rules-of-hooks
+ useEffect(()=>{
+ if (ssrError !== null) {
+ // TODO(veil): Include original Owner Stack (NDX-905)
+ // TODO(veil): Mark as recoverable error
+ // TODO(veil): console.error
+ handleClientError(ssrError);
+ // If it's missing root tags, we can't recover, make it blocking.
+ if (ssrError.digest === MISSING_ROOT_TAGS_ERROR) {
+ onBlockingError();
+ }
+ }
+ }, [
+ ssrError,
+ onBlockingError
+ ]);
+ }
+ return null;
+}
+
+//# sourceMappingURL=replay-ssr-only-errors.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/replay-ssr-only-errors.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/replay-ssr-only-errors.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..062f9185deaa9dbf699ddbbc87506631d24f3070
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/replay-ssr-only-errors.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../../src/next-devtools/userspace/app/errors/replay-ssr-only-errors.tsx"],"sourcesContent":["import { useEffect } from 'react'\nimport { handleClientError } from './use-error-handler'\nimport { isNextRouterError } from '../../../../client/components/is-next-router-error'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../../../shared/lib/errors/constants'\n\nfunction readSsrError(): (Error & { digest?: string }) | null {\n if (typeof document === 'undefined') {\n return null\n }\n\n const ssrErrorTemplateTag = document.querySelector(\n 'template[data-next-error-message]'\n )\n if (ssrErrorTemplateTag) {\n const message: string = ssrErrorTemplateTag.getAttribute(\n 'data-next-error-message'\n )!\n const stack = ssrErrorTemplateTag.getAttribute('data-next-error-stack')\n const digest = ssrErrorTemplateTag.getAttribute('data-next-error-digest')\n const error = new Error(message)\n if (digest) {\n ;(error as any).digest = digest\n }\n // Skip Next.js SSR'd internal errors that which will be handled by the error boundaries.\n if (isNextRouterError(error)) {\n return null\n }\n error.stack = stack || ''\n return error\n }\n\n return null\n}\n\n/**\n * Needs to be in the same error boundary as the shell.\n * If it commits, we know we recovered from an SSR error.\n * If it doesn't commit, we errored again and React will take care of error reporting.\n */\nexport function ReplaySsrOnlyErrors({\n onBlockingError,\n}: {\n onBlockingError: () => void\n}) {\n if (process.env.NODE_ENV !== 'production') {\n // Need to read during render. The attributes will be gone after commit.\n const ssrError = readSsrError()\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n if (ssrError !== null) {\n // TODO(veil): Include original Owner Stack (NDX-905)\n // TODO(veil): Mark as recoverable error\n // TODO(veil): console.error\n handleClientError(ssrError)\n\n // If it's missing root tags, we can't recover, make it blocking.\n if (ssrError.digest === MISSING_ROOT_TAGS_ERROR) {\n onBlockingError()\n }\n }\n }, [ssrError, onBlockingError])\n }\n\n return null\n}\n"],"names":["useEffect","handleClientError","isNextRouterError","MISSING_ROOT_TAGS_ERROR","readSsrError","document","ssrErrorTemplateTag","querySelector","message","getAttribute","stack","digest","error","Error","ReplaySsrOnlyErrors","onBlockingError","process","env","NODE_ENV","ssrError"],"mappings":"AAAA,SAASA,SAAS,QAAQ,QAAO;AACjC,SAASC,iBAAiB,QAAQ,sBAAqB;AACvD,SAASC,iBAAiB,QAAQ,qDAAoD;AACtF,SAASC,uBAAuB,QAAQ,0CAAyC;AAEjF,SAASC;IACP,IAAI,OAAOC,aAAa,aAAa;QACnC,OAAO;IACT;IAEA,MAAMC,sBAAsBD,SAASE,aAAa,CAChD;IAEF,IAAID,qBAAqB;QACvB,MAAME,UAAkBF,oBAAoBG,YAAY,CACtD;QAEF,MAAMC,QAAQJ,oBAAoBG,YAAY,CAAC;QAC/C,MAAME,SAASL,oBAAoBG,YAAY,CAAC;QAChD,MAAMG,QAAQ,IAAIC,MAAML;QACxB,IAAIG,QAAQ;;YACRC,MAAcD,MAAM,GAAGA;QAC3B;QACA,yFAAyF;QACzF,IAAIT,kBAAkBU,QAAQ;YAC5B,OAAO;QACT;QACAA,MAAMF,KAAK,GAAGA,SAAS;QACvB,OAAOE;IACT;IAEA,OAAO;AACT;AAEA;;;;CAIC,GACD,OAAO,SAASE,oBAAoB,EAClCC,eAAe,EAGhB;IACC,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,wEAAwE;QACxE,MAAMC,WAAWf;QACjB,sDAAsD;QACtDJ,UAAU;YACR,IAAImB,aAAa,MAAM;gBACrB,qDAAqD;gBACrD,wCAAwC;gBACxC,4BAA4B;gBAC5BlB,kBAAkBkB;gBAElB,iEAAiE;gBACjE,IAAIA,SAASR,MAAM,KAAKR,yBAAyB;oBAC/CY;gBACF;YACF;QACF,GAAG;YAACI;YAAUJ;SAAgB;IAChC;IAEA,OAAO;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/runtime-error-metadata.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/runtime-error-metadata.js
new file mode 100644
index 0000000000000000000000000000000000000000..cabffcfad02829b17beda5647fb08df0c9a5a136
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/runtime-error-metadata.js
@@ -0,0 +1,12 @@
+const pendingMetadata = new WeakMap();
+// Used only for the synchronous reportError -> window.error handoff.
+export function setRuntimeErrorMetadata(error, metadata) {
+ pendingMetadata.set(error, metadata);
+}
+export function takeRuntimeErrorMetadata(error) {
+ const metadata = pendingMetadata.get(error);
+ pendingMetadata.delete(error);
+ return metadata;
+}
+
+//# sourceMappingURL=runtime-error-metadata.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/runtime-error-metadata.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/runtime-error-metadata.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..4088d377aacb2d7ced2765fb3715ffcc0ea9658e
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/runtime-error-metadata.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../../src/next-devtools/userspace/app/errors/runtime-error-metadata.ts"],"sourcesContent":["import type { RuntimeErrorMetadata } from '../../../../server/dev/hot-reloader-types'\n\nconst pendingMetadata = new WeakMap()\n\n// Used only for the synchronous reportError -> window.error handoff.\nexport function setRuntimeErrorMetadata(\n error: Error,\n metadata: RuntimeErrorMetadata\n) {\n pendingMetadata.set(error, metadata)\n}\n\nexport function takeRuntimeErrorMetadata(error: Error) {\n const metadata = pendingMetadata.get(error)\n pendingMetadata.delete(error)\n return metadata\n}\n"],"names":["pendingMetadata","WeakMap","setRuntimeErrorMetadata","error","metadata","set","takeRuntimeErrorMetadata","get","delete"],"mappings":"AAEA,MAAMA,kBAAkB,IAAIC;AAE5B,qEAAqE;AACrE,OAAO,SAASC,wBACdC,KAAY,EACZC,QAA8B;IAE9BJ,gBAAgBK,GAAG,CAACF,OAAOC;AAC7B;AAEA,OAAO,SAASE,yBAAyBH,KAAY;IACnD,MAAMC,WAAWJ,gBAAgBO,GAAG,CAACJ;IACrCH,gBAAgBQ,MAAM,CAACL;IACvB,OAAOC;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/stitched-error.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/stitched-error.js
new file mode 100644
index 0000000000000000000000000000000000000000..d4ca70194e39727f2aa077988a7592e76ebe7025
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/stitched-error.js
@@ -0,0 +1,31 @@
+import React from 'react';
+import isError from '../../../../lib/is-error';
+const ownerStacks = new WeakMap();
+export function getOwnerStack(error) {
+ return ownerStacks.get(error);
+}
+export function setOwnerStack(error, stack) {
+ ownerStacks.set(error, stack);
+}
+export function coerceError(value) {
+ return isError(value) ? value : new Error('' + value);
+}
+export function setOwnerStackIfAvailable(error) {
+ // React 18 and prod does not have `captureOwnerStack`
+ if ('captureOwnerStack' in React) {
+ const ownerStack = React.captureOwnerStack();
+ // Only set if we captured a valid owner stack, or if none exists yet.
+ // This prevents overwriting a valid owner stack captured earlier
+ // (e.g., in onRecoverableError) with null captured later.
+ if (ownerStack || !ownerStacks.has(error)) {
+ setOwnerStack(error, ownerStack);
+ }
+ }
+}
+export function decorateDevError(thrownValue) {
+ const error = coerceError(thrownValue);
+ setOwnerStackIfAvailable(error);
+ return error;
+}
+
+//# sourceMappingURL=stitched-error.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/stitched-error.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/stitched-error.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..576a7c2d4868bc1b892bb58ad9ff692b10b8d8c7
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/stitched-error.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../../src/next-devtools/userspace/app/errors/stitched-error.ts"],"sourcesContent":["import React from 'react'\nimport isError from '../../../../lib/is-error'\n\nconst ownerStacks = new WeakMap()\n\nexport function getOwnerStack(error: Error): string | null | undefined {\n return ownerStacks.get(error)\n}\nexport function setOwnerStack(error: Error, stack: string | null) {\n ownerStacks.set(error, stack)\n}\n\nexport function coerceError(value: unknown): Error {\n return isError(value) ? value : new Error('' + value)\n}\n\nexport function setOwnerStackIfAvailable(error: Error): void {\n // React 18 and prod does not have `captureOwnerStack`\n if ('captureOwnerStack' in React) {\n const ownerStack = React.captureOwnerStack()\n // Only set if we captured a valid owner stack, or if none exists yet.\n // This prevents overwriting a valid owner stack captured earlier\n // (e.g., in onRecoverableError) with null captured later.\n if (ownerStack || !ownerStacks.has(error)) {\n setOwnerStack(error, ownerStack)\n }\n }\n}\n\nexport function decorateDevError(thrownValue: unknown) {\n const error = coerceError(thrownValue)\n setOwnerStackIfAvailable(error)\n return error\n}\n"],"names":["React","isError","ownerStacks","WeakMap","getOwnerStack","error","get","setOwnerStack","stack","set","coerceError","value","Error","setOwnerStackIfAvailable","ownerStack","captureOwnerStack","has","decorateDevError","thrownValue"],"mappings":"AAAA,OAAOA,WAAW,QAAO;AACzB,OAAOC,aAAa,2BAA0B;AAE9C,MAAMC,cAAc,IAAIC;AAExB,OAAO,SAASC,cAAcC,KAAY;IACxC,OAAOH,YAAYI,GAAG,CAACD;AACzB;AACA,OAAO,SAASE,cAAcF,KAAY,EAAEG,KAAoB;IAC9DN,YAAYO,GAAG,CAACJ,OAAOG;AACzB;AAEA,OAAO,SAASE,YAAYC,KAAc;IACxC,OAAOV,QAAQU,SAASA,QAAQ,IAAIC,MAAM,KAAKD;AACjD;AAEA,OAAO,SAASE,yBAAyBR,KAAY;IACnD,sDAAsD;IACtD,IAAI,uBAAuBL,OAAO;QAChC,MAAMc,aAAad,MAAMe,iBAAiB;QAC1C,sEAAsE;QACtE,iEAAiE;QACjE,0DAA0D;QAC1D,IAAID,cAAc,CAACZ,YAAYc,GAAG,CAACX,QAAQ;YACzCE,cAAcF,OAAOS;QACvB;IACF;AACF;AAEA,OAAO,SAASG,iBAAiBC,WAAoB;IACnD,MAAMb,QAAQK,YAAYQ;IAC1BL,yBAAyBR;IACzB,OAAOA;AACT","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/use-error-handler.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/use-error-handler.js
new file mode 100644
index 0000000000000000000000000000000000000000..d61606f865422d48e3aec19d2f879b9f5c9b3e2e
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/use-error-handler.js
@@ -0,0 +1,131 @@
+import { useEffect } from 'react';
+import { isNextRouterError } from '../../../../client/components/is-next-router-error';
+import { formatConsoleArgs, parseConsoleArgs } from '../../../../client/lib/console';
+import isError from '../../../../lib/is-error';
+import { createConsoleError } from '../../../shared/console-error';
+import { coerceError, setOwnerStackIfAvailable } from './stitched-error';
+import { forwardUnhandledError, logUnhandledRejection } from '../forward-logs';
+const queueMicroTask = globalThis.queueMicrotask || ((cb)=>Promise.resolve().then(cb));
+const errorQueue = [];
+const errorHandlers = [];
+const rejectionQueue = [];
+const rejectionHandlers = [];
+export function handleConsoleError(originError, consoleErrorArgs) {
+ let error;
+ const { environmentName } = parseConsoleArgs(consoleErrorArgs);
+ if (isError(originError)) {
+ error = createConsoleError(originError, environmentName);
+ } else {
+ error = createConsoleError(formatConsoleArgs(consoleErrorArgs), environmentName);
+ }
+ setOwnerStackIfAvailable(error);
+ if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {
+ const { dispatcher } = require('next/dist/compiled/next-devtools');
+ queueMicroTask(()=>dispatcher.onUnhandledError(error));
+ } else {
+ errorQueue.push(error);
+ for (const handler of errorHandlers){
+ // Delayed the error being passed to React Dev Overlay,
+ // avoid the state being synchronously updated in the component.
+ queueMicroTask(()=>{
+ handler(error);
+ });
+ }
+ }
+}
+export function handleClientError(error, metadata = undefined) {
+ if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {
+ const { dispatcher } = require('next/dist/compiled/next-devtools');
+ const { takeRuntimeErrorMetadata } = require('./runtime-error-metadata');
+ const occurrence = metadata ?? takeRuntimeErrorMetadata(error);
+ // The overlay queues events until its own root mounts. Do not depend on
+ // HotReload committing: an initial application failure can prevent that.
+ queueMicroTask(()=>dispatcher.onUnhandledError(error, occurrence));
+ } else {
+ errorQueue.push(error);
+ for (const handler of errorHandlers){
+ // Delayed the error being passed to React Dev Overlay,
+ // avoid the state being synchronously updated in the component.
+ queueMicroTask(()=>{
+ handler(error);
+ });
+ }
+ }
+}
+export function useErrorHandler(handleOnUnhandledError, handleOnUnhandledRejection) {
+ useEffect(()=>{
+ // Handle queued errors.
+ errorQueue.forEach(handleOnUnhandledError);
+ rejectionQueue.forEach(handleOnUnhandledRejection);
+ // Listen to new errors.
+ errorHandlers.push(handleOnUnhandledError);
+ rejectionHandlers.push(handleOnUnhandledRejection);
+ return ()=>{
+ // Remove listeners.
+ errorHandlers.splice(errorHandlers.indexOf(handleOnUnhandledError), 1);
+ rejectionHandlers.splice(rejectionHandlers.indexOf(handleOnUnhandledRejection), 1);
+ // Reset error queues.
+ errorQueue.splice(0, errorQueue.length);
+ rejectionQueue.splice(0, rejectionQueue.length);
+ };
+ }, [
+ handleOnUnhandledError,
+ handleOnUnhandledRejection
+ ]);
+}
+function onUnhandledError(event) {
+ const thrownValue = event.error;
+ if (isNextRouterError(thrownValue)) {
+ event.preventDefault();
+ return false;
+ }
+ // When there's an error property present, we log the error to error overlay.
+ // Otherwise we don't do anything as it's not logging in the console either.
+ if (thrownValue) {
+ const error = coerceError(thrownValue);
+ setOwnerStackIfAvailable(error);
+ if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {
+ const { takeRuntimeErrorMetadata } = require('./runtime-error-metadata');
+ const { isRecoverableError } = require('../../../../client/react-client-callbacks/on-recoverable-error');
+ handleClientError(error, takeRuntimeErrorMetadata(error) ?? (isRecoverableError(error) ? undefined : {
+ fatal: false
+ }));
+ } else {
+ handleClientError(error);
+ }
+ forwardUnhandledError(error);
+ }
+}
+function onUnhandledRejection(ev) {
+ const reason = ev?.reason;
+ if (isNextRouterError(reason)) {
+ ev.preventDefault();
+ return;
+ }
+ const error = coerceError(reason);
+ setOwnerStackIfAvailable(error);
+ if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {
+ const { dispatcher } = require('next/dist/compiled/next-devtools');
+ dispatcher.onUnhandledRejection(error, {
+ fatal: false
+ });
+ } else {
+ rejectionQueue.push(error);
+ for (const handler of rejectionHandlers){
+ handler(error);
+ }
+ }
+ logUnhandledRejection(reason);
+}
+export function handleGlobalErrors() {
+ if (typeof window !== 'undefined') {
+ try {
+ // Increase the number of stack frames on the client
+ Error.stackTraceLimit = 50;
+ } catch {}
+ window.addEventListener('error', onUnhandledError);
+ window.addEventListener('unhandledrejection', onUnhandledRejection);
+ }
+}
+
+//# sourceMappingURL=use-error-handler.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/use-error-handler.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/use-error-handler.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ac1667b9440f0b8c25ab442b00882c99fa952d9a
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/errors/use-error-handler.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../../src/next-devtools/userspace/app/errors/use-error-handler.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport type { RuntimeErrorMetadata } from '../../../../server/dev/hot-reloader-types'\nimport { isNextRouterError } from '../../../../client/components/is-next-router-error'\nimport {\n formatConsoleArgs,\n parseConsoleArgs,\n} from '../../../../client/lib/console'\nimport isError from '../../../../lib/is-error'\nimport { createConsoleError } from '../../../shared/console-error'\nimport { coerceError, setOwnerStackIfAvailable } from './stitched-error'\nimport { forwardUnhandledError, logUnhandledRejection } from '../forward-logs'\n\nconst queueMicroTask =\n globalThis.queueMicrotask || ((cb: () => void) => Promise.resolve().then(cb))\n\ntype ErrorHandler = (error: Error) => void\n\nconst errorQueue: Array = []\nconst errorHandlers: Array = []\nconst rejectionQueue: Array = []\nconst rejectionHandlers: Array = []\n\nexport function handleConsoleError(\n originError: unknown,\n consoleErrorArgs: any[]\n) {\n let error: Error\n const { environmentName } = parseConsoleArgs(consoleErrorArgs)\n if (isError(originError)) {\n error = createConsoleError(originError, environmentName)\n } else {\n error = createConsoleError(\n formatConsoleArgs(consoleErrorArgs),\n environmentName\n )\n }\n setOwnerStackIfAvailable(error)\n\n if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {\n const { dispatcher } =\n require('next/dist/compiled/next-devtools') as typeof import('next/dist/compiled/next-devtools')\n queueMicroTask(() => dispatcher.onUnhandledError(error))\n } else {\n errorQueue.push(error)\n for (const handler of errorHandlers) {\n // Delayed the error being passed to React Dev Overlay,\n // avoid the state being synchronously updated in the component.\n queueMicroTask(() => {\n handler(error)\n })\n }\n }\n}\n\nexport function handleClientError(\n error: Error,\n metadata: RuntimeErrorMetadata | undefined = undefined\n) {\n if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {\n const { dispatcher } =\n require('next/dist/compiled/next-devtools') as typeof import('next/dist/compiled/next-devtools')\n const { takeRuntimeErrorMetadata } =\n require('./runtime-error-metadata') as typeof import('./runtime-error-metadata')\n const occurrence = metadata ?? takeRuntimeErrorMetadata(error)\n // The overlay queues events until its own root mounts. Do not depend on\n // HotReload committing: an initial application failure can prevent that.\n queueMicroTask(() => dispatcher.onUnhandledError(error, occurrence))\n } else {\n errorQueue.push(error)\n for (const handler of errorHandlers) {\n // Delayed the error being passed to React Dev Overlay,\n // avoid the state being synchronously updated in the component.\n queueMicroTask(() => {\n handler(error)\n })\n }\n }\n}\n\nexport function useErrorHandler(\n handleOnUnhandledError: ErrorHandler,\n handleOnUnhandledRejection: ErrorHandler\n) {\n useEffect(() => {\n // Handle queued errors.\n errorQueue.forEach(handleOnUnhandledError)\n rejectionQueue.forEach(handleOnUnhandledRejection)\n\n // Listen to new errors.\n errorHandlers.push(handleOnUnhandledError)\n rejectionHandlers.push(handleOnUnhandledRejection)\n\n return () => {\n // Remove listeners.\n errorHandlers.splice(errorHandlers.indexOf(handleOnUnhandledError), 1)\n rejectionHandlers.splice(\n rejectionHandlers.indexOf(handleOnUnhandledRejection),\n 1\n )\n\n // Reset error queues.\n errorQueue.splice(0, errorQueue.length)\n rejectionQueue.splice(0, rejectionQueue.length)\n }\n }, [handleOnUnhandledError, handleOnUnhandledRejection])\n}\n\nfunction onUnhandledError(event: WindowEventMap['error']): void | boolean {\n const thrownValue: unknown = event.error\n if (isNextRouterError(thrownValue)) {\n event.preventDefault()\n return false\n }\n // When there's an error property present, we log the error to error overlay.\n // Otherwise we don't do anything as it's not logging in the console either.\n if (thrownValue) {\n const error = coerceError(thrownValue)\n setOwnerStackIfAvailable(error)\n if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {\n const { takeRuntimeErrorMetadata } =\n require('./runtime-error-metadata') as typeof import('./runtime-error-metadata')\n const { isRecoverableError } =\n require('../../../../client/react-client-callbacks/on-recoverable-error') as typeof import('../../../../client/react-client-callbacks/on-recoverable-error')\n handleClientError(\n error,\n takeRuntimeErrorMetadata(error) ??\n (isRecoverableError(error) ? undefined : { fatal: false })\n )\n } else {\n handleClientError(error)\n }\n forwardUnhandledError(error)\n }\n}\n\nfunction onUnhandledRejection(ev: WindowEventMap['unhandledrejection']): void {\n const reason: unknown = ev?.reason\n if (isNextRouterError(reason)) {\n ev.preventDefault()\n return\n }\n\n const error = coerceError(reason)\n setOwnerStackIfAvailable(error)\n\n if (process.env.__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR) {\n const { dispatcher } =\n require('next/dist/compiled/next-devtools') as typeof import('next/dist/compiled/next-devtools')\n dispatcher.onUnhandledRejection(error, { fatal: false })\n } else {\n rejectionQueue.push(error)\n for (const handler of rejectionHandlers) {\n handler(error)\n }\n }\n\n logUnhandledRejection(reason)\n}\n\nexport function handleGlobalErrors() {\n if (typeof window !== 'undefined') {\n try {\n // Increase the number of stack frames on the client\n Error.stackTraceLimit = 50\n } catch {}\n\n window.addEventListener('error', onUnhandledError)\n window.addEventListener('unhandledrejection', onUnhandledRejection)\n }\n}\n"],"names":["useEffect","isNextRouterError","formatConsoleArgs","parseConsoleArgs","isError","createConsoleError","coerceError","setOwnerStackIfAvailable","forwardUnhandledError","logUnhandledRejection","queueMicroTask","globalThis","queueMicrotask","cb","Promise","resolve","then","errorQueue","errorHandlers","rejectionQueue","rejectionHandlers","handleConsoleError","originError","consoleErrorArgs","error","environmentName","process","env","__NEXT_EXPOSE_RUNTIME_ERRORS_TO_HMR","dispatcher","require","onUnhandledError","push","handler","handleClientError","metadata","undefined","takeRuntimeErrorMetadata","occurrence","useErrorHandler","handleOnUnhandledError","handleOnUnhandledRejection","forEach","splice","indexOf","length","event","thrownValue","preventDefault","isRecoverableError","fatal","onUnhandledRejection","ev","reason","handleGlobalErrors","window","Error","stackTraceLimit","addEventListener"],"mappings":"AAAA,SAASA,SAAS,QAAQ,QAAO;AAEjC,SAASC,iBAAiB,QAAQ,qDAAoD;AACtF,SACEC,iBAAiB,EACjBC,gBAAgB,QACX,iCAAgC;AACvC,OAAOC,aAAa,2BAA0B;AAC9C,SAASC,kBAAkB,QAAQ,gCAA+B;AAClE,SAASC,WAAW,EAAEC,wBAAwB,QAAQ,mBAAkB;AACxE,SAASC,qBAAqB,EAAEC,qBAAqB,QAAQ,kBAAiB;AAE9E,MAAMC,iBACJC,WAAWC,cAAc,IAAK,CAAA,CAACC,KAAmBC,QAAQC,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;QACVD,WAAWsB,oBAAoB,CAAC3B,OAAO;YAAE0B,OAAO;QAAM;IACxD,OAAO;QACL/B,eAAea,IAAI,CAACR;QACpB,KAAK,MAAMS,WAAWb,kBAAmB;YACvCa,QAAQT;QACV;IACF;IAEAf,sBAAsB4C;AACxB;AAEA,OAAO,SAASC;IACd,IAAI,OAAOC,WAAW,aAAa;QACjC,IAAI;YACF,oDAAoD;YACpDC,MAAMC,eAAe,GAAG;QAC1B,EAAE,OAAM,CAAC;QAETF,OAAOG,gBAAgB,CAAC,SAAS3B;QACjCwB,OAAOG,gBAAgB,CAAC,sBAAsBP;IAChD;AACF","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs-utils.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs-utils.js
new file mode 100644
index 0000000000000000000000000000000000000000..0e6986f498605d26ac00abd9b2a37b5c69447d3c
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs-utils.js
@@ -0,0 +1,69 @@
+import { configure } from 'next/dist/compiled/safe-stable-stringify';
+import { getTerminalLoggingConfig } from './terminal-logging-config';
+import { UNDEFINED_MARKER } from '../../shared/forward-logs-shared';
+const terminalLoggingConfig = getTerminalLoggingConfig();
+const PROMISE_MARKER = 'Promise {}';
+const UNAVAILABLE_MARKER = '[Unable to view]';
+const maximumDepth = typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.depthLimit ? terminalLoggingConfig.depthLimit : 5;
+const maximumBreadth = typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.edgeLimit ? terminalLoggingConfig.edgeLimit : 100;
+export const safeStringifyWithDepth = configure({
+ maximumDepth,
+ maximumBreadth
+});
+/**
+ * allows us to:
+ * - revive the undefined log in the server as it would look in the browser
+ * - not read/attempt to serialize promises (next will console error if you do that, and will cause this program to infinitely recurse)
+ * - if we read a proxy that throws (no way to detect if something is a proxy), explain to the user we can't read this data
+ */ export function preLogSerializationClone(value, seen = new WeakMap()) {
+ if (value === undefined) return UNDEFINED_MARKER;
+ if (value === null || typeof value !== 'object') return value;
+ if (seen.has(value)) return seen.get(value);
+ try {
+ Object.keys(value);
+ } catch {
+ return UNAVAILABLE_MARKER;
+ }
+ try {
+ if (typeof value.then === 'function') return PROMISE_MARKER;
+ } catch {
+ return UNAVAILABLE_MARKER;
+ }
+ if (Array.isArray(value)) {
+ const out = [];
+ seen.set(value, out);
+ for (const item of value){
+ try {
+ out.push(preLogSerializationClone(item, seen));
+ } catch {
+ out.push(UNAVAILABLE_MARKER);
+ }
+ }
+ return out;
+ }
+ const proto = Object.getPrototypeOf(value);
+ if (proto === Object.prototype || proto === null) {
+ const out = {};
+ seen.set(value, out);
+ for (const key of Object.keys(value)){
+ try {
+ out[key] = preLogSerializationClone(value[key], seen);
+ } catch {
+ out[key] = UNAVAILABLE_MARKER;
+ }
+ }
+ return out;
+ }
+ return Object.prototype.toString.call(value);
+}
+// only safe if passed safeClone data
+export const logStringify = (data)=>{
+ try {
+ const result = safeStringifyWithDepth(data);
+ return result ?? `"${UNAVAILABLE_MARKER}"`;
+ } catch {
+ return `"${UNAVAILABLE_MARKER}"`;
+ }
+};
+
+//# sourceMappingURL=forward-logs-utils.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs-utils.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs-utils.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..b55395df12eb87ac143c4d60e776a47c71a0b1d4
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs-utils.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/userspace/app/forward-logs-utils.ts"],"sourcesContent":["import { configure } from 'next/dist/compiled/safe-stable-stringify'\nimport { getTerminalLoggingConfig } from './terminal-logging-config'\nimport { UNDEFINED_MARKER } from '../../shared/forward-logs-shared'\n\nconst terminalLoggingConfig = getTerminalLoggingConfig()\n\nconst PROMISE_MARKER = 'Promise {}'\nconst UNAVAILABLE_MARKER = '[Unable to view]'\n\nconst maximumDepth =\n typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.depthLimit\n ? terminalLoggingConfig.depthLimit\n : 5\nconst maximumBreadth =\n typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.edgeLimit\n ? terminalLoggingConfig.edgeLimit\n : 100\n\nexport const safeStringifyWithDepth = configure({\n maximumDepth,\n maximumBreadth,\n})\n\n/**\n * allows us to:\n * - revive the undefined log in the server as it would look in the browser\n * - not read/attempt to serialize promises (next will console error if you do that, and will cause this program to infinitely recurse)\n * - if we read a proxy that throws (no way to detect if something is a proxy), explain to the user we can't read this data\n */\nexport function preLogSerializationClone(\n value: T,\n seen = new WeakMap()\n): any {\n if (value === undefined) return UNDEFINED_MARKER\n if (value === null || typeof value !== 'object') return value\n if (seen.has(value as object)) return seen.get(value as object)\n\n try {\n Object.keys(value as object)\n } catch {\n return UNAVAILABLE_MARKER\n }\n\n try {\n if (typeof (value as any).then === 'function') return PROMISE_MARKER\n } catch {\n return UNAVAILABLE_MARKER\n }\n\n if (Array.isArray(value)) {\n const out: any[] = []\n seen.set(value, out)\n for (const item of value) {\n try {\n out.push(preLogSerializationClone(item, seen))\n } catch {\n out.push(UNAVAILABLE_MARKER)\n }\n }\n return out\n }\n\n const proto = Object.getPrototypeOf(value)\n if (proto === Object.prototype || proto === null) {\n const out: Record = {}\n seen.set(value as object, out)\n for (const key of Object.keys(value as object)) {\n try {\n out[key] = preLogSerializationClone((value as any)[key], seen)\n } catch {\n out[key] = UNAVAILABLE_MARKER\n }\n }\n return out\n }\n\n return Object.prototype.toString.call(value)\n}\n\n// only safe if passed safeClone data\nexport const logStringify = (data: unknown): string => {\n try {\n const result = safeStringifyWithDepth(data)\n return result ?? `\"${UNAVAILABLE_MARKER}\"`\n } catch {\n return `\"${UNAVAILABLE_MARKER}\"`\n }\n}\n"],"names":["configure","getTerminalLoggingConfig","UNDEFINED_MARKER","terminalLoggingConfig","PROMISE_MARKER","UNAVAILABLE_MARKER","maximumDepth","depthLimit","maximumBreadth","edgeLimit","safeStringifyWithDepth","preLogSerializationClone","value","seen","WeakMap","undefined","has","get","Object","keys","then","Array","isArray","out","set","item","push","proto","getPrototypeOf","prototype","key","toString","call","logStringify","data","result"],"mappings":"AAAA,SAASA,SAAS,QAAQ,2CAA0C;AACpE,SAASC,wBAAwB,QAAQ,4BAA2B;AACpE,SAASC,gBAAgB,QAAQ,mCAAkC;AAEnE,MAAMC,wBAAwBF;AAE9B,MAAMG,iBAAiB;AACvB,MAAMC,qBAAqB;AAE3B,MAAMC,eACJ,OAAOH,0BAA0B,YAAYA,sBAAsBI,UAAU,GACzEJ,sBAAsBI,UAAU,GAChC;AACN,MAAMC,iBACJ,OAAOL,0BAA0B,YAAYA,sBAAsBM,SAAS,GACxEN,sBAAsBM,SAAS,GAC/B;AAEN,OAAO,MAAMC,yBAAyBV,UAAU;IAC9CM;IACAE;AACF,GAAE;AAEF;;;;;CAKC,GACD,OAAO,SAASG,yBACdC,KAAQ,EACRC,OAAO,IAAIC,SAAS;IAEpB,IAAIF,UAAUG,WAAW,OAAOb;IAChC,IAAIU,UAAU,QAAQ,OAAOA,UAAU,UAAU,OAAOA;IACxD,IAAIC,KAAKG,GAAG,CAACJ,QAAkB,OAAOC,KAAKI,GAAG,CAACL;IAE/C,IAAI;QACFM,OAAOC,IAAI,CAACP;IACd,EAAE,OAAM;QACN,OAAOP;IACT;IAEA,IAAI;QACF,IAAI,OAAO,AAACO,MAAcQ,IAAI,KAAK,YAAY,OAAOhB;IACxD,EAAE,OAAM;QACN,OAAOC;IACT;IAEA,IAAIgB,MAAMC,OAAO,CAACV,QAAQ;QACxB,MAAMW,MAAa,EAAE;QACrBV,KAAKW,GAAG,CAACZ,OAAOW;QAChB,KAAK,MAAME,QAAQb,MAAO;YACxB,IAAI;gBACFW,IAAIG,IAAI,CAACf,yBAAyBc,MAAMZ;YAC1C,EAAE,OAAM;gBACNU,IAAIG,IAAI,CAACrB;YACX;QACF;QACA,OAAOkB;IACT;IAEA,MAAMI,QAAQT,OAAOU,cAAc,CAAChB;IACpC,IAAIe,UAAUT,OAAOW,SAAS,IAAIF,UAAU,MAAM;QAChD,MAAMJ,MAA+B,CAAC;QACtCV,KAAKW,GAAG,CAACZ,OAAiBW;QAC1B,KAAK,MAAMO,OAAOZ,OAAOC,IAAI,CAACP,OAAkB;YAC9C,IAAI;gBACFW,GAAG,CAACO,IAAI,GAAGnB,yBAAyB,AAACC,KAAa,CAACkB,IAAI,EAAEjB;YAC3D,EAAE,OAAM;gBACNU,GAAG,CAACO,IAAI,GAAGzB;YACb;QACF;QACA,OAAOkB;IACT;IAEA,OAAOL,OAAOW,SAAS,CAACE,QAAQ,CAACC,IAAI,CAACpB;AACxC;AAEA,qCAAqC;AACrC,OAAO,MAAMqB,eAAe,CAACC;IAC3B,IAAI;QACF,MAAMC,SAASzB,uBAAuBwB;QACtC,OAAOC,UAAU,CAAC,CAAC,EAAE9B,mBAAmB,CAAC,CAAC;IAC5C,EAAE,OAAM;QACN,OAAO,CAAC,CAAC,EAAEA,mBAAmB,CAAC,CAAC;IAClC;AACF,EAAC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs.js
new file mode 100644
index 0000000000000000000000000000000000000000..45bb60e5bc063a4eea72ba46aa25b2ed3f5331de
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs.js
@@ -0,0 +1,326 @@
+import { getErrorSource } from '../../../shared/lib/error-source';
+import { getIsTerminalLoggingEnabled } from './terminal-logging-config';
+import { patchConsoleMethod, wasErrorAlreadyLoggedOnServer } from '../../shared/forward-logs-shared';
+import { preLogSerializationClone, logStringify } from './forward-logs-utils';
+import { getOwnerStack } from './errors/stitched-error';
+const isTerminalLoggingEnabled = getIsTerminalLoggingEnabled();
+const shouldForwardLogs = isTerminalLoggingEnabled || !!process.env.__NEXT_MCP_SERVER;
+const methods = [
+ 'log',
+ 'info',
+ 'warn',
+ 'debug',
+ 'table',
+ 'assert',
+ 'dir',
+ 'dirxml',
+ 'group',
+ 'groupCollapsed',
+ 'groupEnd',
+ 'trace'
+];
+const afterThisFrame = (cb)=>{
+ let timeout;
+ const rafId = requestAnimationFrame(()=>{
+ timeout = setTimeout(()=>{
+ cb();
+ });
+ });
+ return ()=>{
+ cancelAnimationFrame(rafId);
+ clearTimeout(timeout);
+ };
+};
+let isPatched = false;
+const serializeEntries = (entries)=>entries.map((clientEntry)=>{
+ switch(clientEntry.kind){
+ case 'any-logged-error':
+ case 'console':
+ {
+ return {
+ ...clientEntry,
+ args: clientEntry.args.map(stringifyUserArg)
+ };
+ }
+ case 'formatted-error':
+ {
+ return clientEntry;
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ });
+const flushBufferedEntries = (socket)=>{
+ if (logQueue.entries.length === 0) {
+ return;
+ }
+ const payload = JSON.stringify({
+ event: 'browser-logs',
+ entries: serializeEntries(logQueue.entries),
+ router: logQueue.router,
+ // needed for source mapping, we just assign the sourceType from the last error for the whole batch
+ sourceType: logQueue.sourceType
+ });
+ socket.send(payload);
+ logQueue.entries = [];
+ logQueue.sourceType = undefined;
+};
+// Combined state and public API
+export const logQueue = {
+ entries: [],
+ flushScheduled: false,
+ cancelFlush: null,
+ socket: null,
+ sourceType: undefined,
+ router: null,
+ scheduleLogSend: (entry)=>{
+ logQueue.entries.push(entry);
+ if (logQueue.flushScheduled) {
+ return;
+ }
+ // safe to deref and use in setTimeout closure since we cancel on new socket
+ const socket = logQueue.socket;
+ if (!socket) {
+ return;
+ }
+ // we probably dont need this
+ logQueue.flushScheduled = true;
+ // non blocking log flush, runs at most once per frame
+ logQueue.cancelFlush = afterThisFrame(()=>{
+ logQueue.flushScheduled = false;
+ // just incase
+ try {
+ flushBufferedEntries(socket);
+ } catch {
+ // error (make sure u don't infinite loop)
+ /* noop */ }
+ });
+ },
+ onSocketReady: (socket)=>{
+ // When MCP or terminal logging is enabled, we enable the socket connection,
+ // otherwise it will not proceed.
+ if (!shouldForwardLogs) {
+ return;
+ }
+ if (socket.readyState !== WebSocket.OPEN) {
+ // invariant
+ return;
+ }
+ // incase an existing timeout was going to run with a stale socket
+ logQueue.cancelFlush?.();
+ logQueue.socket = socket;
+ try {
+ flushBufferedEntries(socket);
+ } catch {
+ /** noop just incase */ }
+ }
+};
+const stringifyUserArg = (arg)=>{
+ if (arg.kind !== 'arg') {
+ return arg;
+ }
+ return {
+ ...arg,
+ data: logStringify(arg.data)
+ };
+};
+const createErrorArg = (error)=>{
+ return {
+ kind: 'formatted-error-arg',
+ prefix: error.message ? `${error.name}: ${error.message}` : `${error.name}`,
+ stack: getErrorStackWithOwnerStack(error)
+ };
+};
+const createLogEntry = (level, args)=>{
+ if (!shouldForwardLogs) {
+ return;
+ }
+ // do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers
+ // error capture stack trace maybe
+ const stack = getErrorStack(new Error());
+ const stackLines = stack?.split('\n');
+ const cleanStack = stackLines?.slice(3).join('\n') // this is probably ignored anyways
+ ;
+ const entry = {
+ kind: 'console',
+ consoleMethodStack: cleanStack ?? null,
+ method: level,
+ args: args.map((arg)=>{
+ if (arg instanceof Error) {
+ return createErrorArg(arg);
+ }
+ return {
+ kind: 'arg',
+ data: preLogSerializationClone(arg)
+ };
+ })
+ };
+ logQueue.scheduleLogSend(entry);
+};
+export const forwardErrorLog = (args)=>{
+ // Skip React server replayed logs - they were already logged on the server
+ if (isReactServerReplayedLog(args)) {
+ return;
+ }
+ if (!shouldForwardLogs) {
+ return;
+ }
+ const errorObjects = args.filter((arg)=>arg instanceof Error);
+ const first = errorObjects.at(0);
+ // Skip errors that originated on the server and were already logged there
+ // (e.g. Cache Components validation errors that are also sent to the browser
+ // to show in the dev overlay). Forwarding them back would duplicate them in
+ // the terminal.
+ if (first && wasErrorAlreadyLoggedOnServer(first)) {
+ return;
+ }
+ if (first) {
+ const source = getErrorSource(first);
+ if (source) {
+ logQueue.sourceType = source;
+ }
+ }
+ /**
+ * browser shows stack regardless of type of data passed to console.error, so we should do the same
+ *
+ * do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers
+ */ const stack = getErrorStack(new Error());
+ const stackLines = stack?.split('\n');
+ const cleanStack = stackLines?.slice(3).join('\n');
+ const entry = {
+ kind: 'any-logged-error',
+ method: 'error',
+ consoleErrorStack: cleanStack ?? '',
+ args: args.map((arg)=>{
+ if (arg instanceof Error) {
+ return createErrorArg(arg);
+ }
+ return {
+ kind: 'arg',
+ data: preLogSerializationClone(arg)
+ };
+ })
+ };
+ logQueue.scheduleLogSend(entry);
+};
+const createUncaughtErrorEntry = (errorName, errorMessage, fullStack)=>{
+ const entry = {
+ kind: 'formatted-error',
+ prefix: `Uncaught ${errorName}: ${errorMessage}`,
+ stack: fullStack,
+ method: 'error'
+ };
+ logQueue.scheduleLogSend(entry);
+};
+const getErrorStack = (error)=>{
+ return error.stack || '';
+};
+// Get error stack with owner stack appended for source mapping on the server
+const getErrorStackWithOwnerStack = (error)=>{
+ const errorStack = getErrorStack(error);
+ const ownerStack = getOwnerStack(error);
+ return ownerStack ? `${errorStack}\n${ownerStack}` : errorStack;
+};
+export function logUnhandledRejection(reason) {
+ if (!shouldForwardLogs) {
+ return;
+ }
+ if (reason instanceof Error) {
+ createUnhandledRejectionErrorEntry(reason, getErrorStackWithOwnerStack(reason));
+ return;
+ }
+ createUnhandledRejectionNonErrorEntry(reason);
+}
+const createUnhandledRejectionErrorEntry = (error, fullStack)=>{
+ const source = getErrorSource(error);
+ if (source) {
+ logQueue.sourceType = source;
+ }
+ const entry = {
+ kind: 'formatted-error',
+ prefix: `⨯ unhandledRejection: ${error.name}: ${error.message}`,
+ stack: fullStack,
+ method: 'error'
+ };
+ logQueue.scheduleLogSend(entry);
+};
+const createUnhandledRejectionNonErrorEntry = (reason)=>{
+ const entry = {
+ kind: 'any-logged-error',
+ // we can't access the stack since the event is dispatched async and creating an inline error would be meaningless
+ consoleErrorStack: '',
+ method: 'error',
+ args: [
+ {
+ kind: 'arg',
+ data: `⨯ unhandledRejection:`,
+ isRejectionMessage: true
+ },
+ {
+ kind: 'arg',
+ data: preLogSerializationClone(reason)
+ }
+ ]
+ };
+ logQueue.scheduleLogSend(entry);
+};
+const isHMR = (args)=>{
+ const firstArg = args[0];
+ if (typeof firstArg !== 'string') {
+ return false;
+ }
+ if (firstArg.startsWith('[Fast Refresh]')) {
+ return true;
+ }
+ if (firstArg.startsWith('[HMR]')) {
+ return true;
+ }
+ return false;
+};
+/**
+ * Matches the format of logs arguments React replayed from the RSC.
+ */ const isReactServerReplayedLog = (args)=>{
+ if (args.length < 3) {
+ return false;
+ }
+ const [format, styles, label] = args;
+ if (typeof format !== 'string' || typeof styles !== 'string' || typeof label !== 'string') {
+ return false;
+ }
+ return format.startsWith('%c%s%c') && styles.includes('background:');
+};
+export function forwardUnhandledError(error) {
+ if (!shouldForwardLogs) {
+ return;
+ }
+ createUncaughtErrorEntry(error.name, error.message, getErrorStackWithOwnerStack(error));
+}
+// TODO: this router check is brittle, we need to update based on the current router the user is using
+export const initializeDebugLogForwarding = (router)=>{
+ // probably don't need this
+ if (isPatched) {
+ return;
+ }
+ // TODO(rob): why does this break rendering on server, important to know incase the same bug appears in browser
+ if (typeof window === 'undefined') {
+ return;
+ }
+ // better to be safe than sorry
+ try {
+ methods.forEach((method)=>patchConsoleMethod(method, (_, ...args)=>{
+ if (isHMR(args)) {
+ return;
+ }
+ if (isReactServerReplayedLog(args)) {
+ return;
+ }
+ createLogEntry(method, args);
+ }));
+ } catch {}
+ logQueue.router = router;
+ isPatched = true;
+};
+
+//# sourceMappingURL=forward-logs.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..8f045d8f3aa63dfac4d9cfe2b258b4ec4efb2d0d
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/forward-logs.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/userspace/app/forward-logs.ts"],"sourcesContent":["import { getErrorSource } from '../../../shared/lib/error-source'\nimport { getIsTerminalLoggingEnabled } from './terminal-logging-config'\nimport {\n type ConsoleEntry,\n type ConsoleErrorEntry,\n type FormattedErrorEntry,\n type ClientLogEntry,\n type LogMethod,\n patchConsoleMethod,\n wasErrorAlreadyLoggedOnServer,\n} from '../../shared/forward-logs-shared'\nimport { preLogSerializationClone, logStringify } from './forward-logs-utils'\nimport { getOwnerStack } from './errors/stitched-error'\n\nconst isTerminalLoggingEnabled = getIsTerminalLoggingEnabled()\nconst shouldForwardLogs =\n isTerminalLoggingEnabled || !!process.env.__NEXT_MCP_SERVER\n\nconst methods: Array = [\n 'log',\n 'info',\n 'warn',\n 'debug',\n 'table',\n 'assert',\n 'dir',\n 'dirxml',\n 'group',\n 'groupCollapsed',\n 'groupEnd',\n 'trace',\n]\n\nconst afterThisFrame = (cb: () => void) => {\n let timeout: ReturnType | undefined\n\n const rafId = requestAnimationFrame(() => {\n timeout = setTimeout(() => {\n cb()\n })\n })\n\n return () => {\n cancelAnimationFrame(rafId)\n clearTimeout(timeout)\n }\n}\n\nlet isPatched = false\n\nconst serializeEntries = (entries: Array) =>\n entries.map((clientEntry) => {\n switch (clientEntry.kind) {\n case 'any-logged-error':\n case 'console': {\n return {\n ...clientEntry,\n args: clientEntry.args.map(stringifyUserArg),\n }\n }\n case 'formatted-error': {\n return clientEntry\n }\n default: {\n return null!\n }\n }\n })\n\nconst flushBufferedEntries = (socket: WebSocket) => {\n if (logQueue.entries.length === 0) {\n return\n }\n\n const payload = JSON.stringify({\n event: 'browser-logs',\n entries: serializeEntries(logQueue.entries),\n router: logQueue.router,\n // needed for source mapping, we just assign the sourceType from the last error for the whole batch\n sourceType: logQueue.sourceType,\n })\n\n socket.send(payload)\n logQueue.entries = []\n logQueue.sourceType = undefined\n}\n\n// Combined state and public API\nexport const logQueue: {\n entries: Array\n onSocketReady: (socket: WebSocket) => void\n flushScheduled: boolean\n socket: WebSocket | null\n cancelFlush: (() => void) | null\n sourceType?: 'server' | 'edge-server'\n router: 'app' | 'pages' | null\n scheduleLogSend: (entry: ClientLogEntry) => void\n} = {\n entries: [],\n flushScheduled: false,\n cancelFlush: null,\n socket: null,\n sourceType: undefined,\n router: null,\n scheduleLogSend: (entry: ClientLogEntry) => {\n logQueue.entries.push(entry)\n if (logQueue.flushScheduled) {\n return\n }\n // safe to deref and use in setTimeout closure since we cancel on new socket\n const socket = logQueue.socket\n if (!socket) {\n return\n }\n\n // we probably dont need this\n logQueue.flushScheduled = true\n\n // non blocking log flush, runs at most once per frame\n logQueue.cancelFlush = afterThisFrame(() => {\n logQueue.flushScheduled = false\n\n // just incase\n try {\n flushBufferedEntries(socket)\n } catch {\n // error (make sure u don't infinite loop)\n /* noop */\n }\n })\n },\n onSocketReady: (socket: WebSocket) => {\n // When MCP or terminal logging is enabled, we enable the socket connection,\n // otherwise it will not proceed.\n if (!shouldForwardLogs) {\n return\n }\n if (socket.readyState !== WebSocket.OPEN) {\n // invariant\n return\n }\n\n // incase an existing timeout was going to run with a stale socket\n logQueue.cancelFlush?.()\n logQueue.socket = socket\n\n try {\n flushBufferedEntries(socket)\n } catch {\n /** noop just incase */\n }\n },\n}\n\nconst stringifyUserArg = (\n arg:\n | {\n kind: 'arg'\n data: unknown\n }\n | {\n kind: 'formatted-error-arg'\n }\n) => {\n if (arg.kind !== 'arg') {\n return arg\n }\n return {\n ...arg,\n data: logStringify(arg.data),\n }\n}\n\nconst createErrorArg = (error: Error) => {\n return {\n kind: 'formatted-error-arg' as const,\n prefix: error.message ? `${error.name}: ${error.message}` : `${error.name}`,\n stack: getErrorStackWithOwnerStack(error),\n }\n}\n\nconst createLogEntry = (level: LogMethod, args: any[]) => {\n if (!shouldForwardLogs) {\n return\n }\n\n // do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n // error capture stack trace maybe\n const stack = getErrorStack(new Error())\n const stackLines = stack?.split('\\n')\n const cleanStack = stackLines?.slice(3).join('\\n') // this is probably ignored anyways\n const entry: ConsoleEntry = {\n kind: 'console',\n consoleMethodStack: cleanStack ?? null, // depending on browser we might not have stack\n method: level,\n args: args.map((arg) => {\n if (arg instanceof Error) {\n return createErrorArg(arg)\n }\n return {\n kind: 'arg',\n data: preLogSerializationClone(arg),\n }\n }),\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nexport const forwardErrorLog = (args: any[]) => {\n // Skip React server replayed logs - they were already logged on the server\n if (isReactServerReplayedLog(args)) {\n return\n }\n\n if (!shouldForwardLogs) {\n return\n }\n\n const errorObjects = args.filter((arg) => arg instanceof Error)\n const first = errorObjects.at(0)\n // Skip errors that originated on the server and were already logged there\n // (e.g. Cache Components validation errors that are also sent to the browser\n // to show in the dev overlay). Forwarding them back would duplicate them in\n // the terminal.\n if (first && wasErrorAlreadyLoggedOnServer(first)) {\n return\n }\n if (first) {\n const source = getErrorSource(first)\n if (source) {\n logQueue.sourceType = source\n }\n }\n /**\n * browser shows stack regardless of type of data passed to console.error, so we should do the same\n *\n * do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n */\n const stack = getErrorStack(new Error())\n const stackLines = stack?.split('\\n')\n const cleanStack = stackLines?.slice(3).join('\\n')\n\n const entry: ConsoleErrorEntry = {\n kind: 'any-logged-error',\n method: 'error',\n consoleErrorStack: cleanStack ?? '',\n args: args.map((arg) => {\n if (arg instanceof Error) {\n return createErrorArg(arg)\n }\n return {\n kind: 'arg',\n data: preLogSerializationClone(arg),\n }\n }),\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst createUncaughtErrorEntry = (\n errorName: string,\n errorMessage: string,\n fullStack: string\n) => {\n const entry: FormattedErrorEntry = {\n kind: 'formatted-error',\n prefix: `Uncaught ${errorName}: ${errorMessage}`,\n stack: fullStack,\n method: 'error',\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst getErrorStack = (error: Error) => {\n return error.stack || ''\n}\n\n// Get error stack with owner stack appended for source mapping on the server\nconst getErrorStackWithOwnerStack = (error: Error) => {\n const errorStack = getErrorStack(error)\n const ownerStack = getOwnerStack(error)\n return ownerStack ? `${errorStack}\\n${ownerStack}` : errorStack\n}\n\nexport function logUnhandledRejection(reason: unknown) {\n if (!shouldForwardLogs) {\n return\n }\n\n if (reason instanceof Error) {\n createUnhandledRejectionErrorEntry(\n reason,\n getErrorStackWithOwnerStack(reason)\n )\n return\n }\n createUnhandledRejectionNonErrorEntry(reason)\n}\n\nconst createUnhandledRejectionErrorEntry = (\n error: Error,\n fullStack: string\n) => {\n const source = getErrorSource(error)\n if (source) {\n logQueue.sourceType = source\n }\n\n const entry: ClientLogEntry = {\n kind: 'formatted-error',\n prefix: `⨯ unhandledRejection: ${error.name}: ${error.message}`,\n stack: fullStack,\n method: 'error',\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst createUnhandledRejectionNonErrorEntry = (reason: unknown) => {\n const entry: ClientLogEntry = {\n kind: 'any-logged-error',\n // we can't access the stack since the event is dispatched async and creating an inline error would be meaningless\n consoleErrorStack: '',\n method: 'error',\n args: [\n {\n kind: 'arg',\n data: `⨯ unhandledRejection:`,\n isRejectionMessage: true,\n },\n {\n kind: 'arg',\n data: preLogSerializationClone(reason),\n },\n ],\n }\n\n logQueue.scheduleLogSend(entry)\n}\n\nconst isHMR = (args: any[]) => {\n const firstArg = args[0]\n if (typeof firstArg !== 'string') {\n return false\n }\n if (firstArg.startsWith('[Fast Refresh]')) {\n return true\n }\n\n if (firstArg.startsWith('[HMR]')) {\n return true\n }\n\n return false\n}\n\n/**\n * Matches the format of logs arguments React replayed from the RSC.\n */\nconst isReactServerReplayedLog = (args: any[]) => {\n if (args.length < 3) {\n return false\n }\n\n const [format, styles, label] = args\n\n if (\n typeof format !== 'string' ||\n typeof styles !== 'string' ||\n typeof label !== 'string'\n ) {\n return false\n }\n\n return format.startsWith('%c%s%c') && styles.includes('background:')\n}\n\nexport function forwardUnhandledError(error: Error) {\n if (!shouldForwardLogs) {\n return\n }\n\n createUncaughtErrorEntry(\n error.name,\n error.message,\n getErrorStackWithOwnerStack(error)\n )\n}\n\n// TODO: this router check is brittle, we need to update based on the current router the user is using\nexport const initializeDebugLogForwarding = (router: 'app' | 'pages'): void => {\n // probably don't need this\n if (isPatched) {\n return\n }\n // TODO(rob): why does this break rendering on server, important to know incase the same bug appears in browser\n if (typeof window === 'undefined') {\n return\n }\n\n // better to be safe than sorry\n try {\n methods.forEach((method) =>\n patchConsoleMethod(method, (_, ...args) => {\n if (isHMR(args)) {\n return\n }\n if (isReactServerReplayedLog(args)) {\n return\n }\n createLogEntry(method, args)\n })\n )\n } catch {}\n logQueue.router = router\n isPatched = true\n}\n"],"names":["getErrorSource","getIsTerminalLoggingEnabled","patchConsoleMethod","wasErrorAlreadyLoggedOnServer","preLogSerializationClone","logStringify","getOwnerStack","isTerminalLoggingEnabled","shouldForwardLogs","process","env","__NEXT_MCP_SERVER","methods","afterThisFrame","cb","timeout","rafId","requestAnimationFrame","setTimeout","cancelAnimationFrame","clearTimeout","isPatched","serializeEntries","entries","map","clientEntry","kind","args","stringifyUserArg","flushBufferedEntries","socket","logQueue","length","payload","JSON","stringify","event","router","sourceType","send","undefined","flushScheduled","cancelFlush","scheduleLogSend","entry","push","onSocketReady","readyState","WebSocket","OPEN","arg","data","createErrorArg","error","prefix","message","name","stack","getErrorStackWithOwnerStack","createLogEntry","level","getErrorStack","Error","stackLines","split","cleanStack","slice","join","consoleMethodStack","method","forwardErrorLog","isReactServerReplayedLog","errorObjects","filter","first","at","source","consoleErrorStack","createUncaughtErrorEntry","errorName","errorMessage","fullStack","errorStack","ownerStack","logUnhandledRejection","reason","createUnhandledRejectionErrorEntry","createUnhandledRejectionNonErrorEntry","isRejectionMessage","isHMR","firstArg","startsWith","format","styles","label","includes","forwardUnhandledError","initializeDebugLogForwarding","window","forEach","_"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mCAAkC;AACjE,SAASC,2BAA2B,QAAQ,4BAA2B;AACvE,SAMEC,kBAAkB,EAClBC,6BAA6B,QACxB,mCAAkC;AACzC,SAASC,wBAAwB,EAAEC,YAAY,QAAQ,uBAAsB;AAC7E,SAASC,aAAa,QAAQ,0BAAyB;AAEvD,MAAMC,2BAA2BN;AACjC,MAAMO,oBACJD,4BAA4B,CAAC,CAACE,QAAQC,GAAG,CAACC,iBAAiB;AAE7D,MAAMC,UAA4B;IAChC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,MAAMC,iBAAiB,CAACC;IACtB,IAAIC;IAEJ,MAAMC,QAAQC,sBAAsB;QAClCF,UAAUG,WAAW;YACnBJ;QACF;IACF;IAEA,OAAO;QACLK,qBAAqBH;QACrBI,aAAaL;IACf;AACF;AAEA,IAAIM,YAAY;AAEhB,MAAMC,mBAAmB,CAACC,UACxBA,QAAQC,GAAG,CAAC,CAACC;QACX,OAAQA,YAAYC,IAAI;YACtB,KAAK;YACL,KAAK;gBAAW;oBACd,OAAO;wBACL,GAAGD,WAAW;wBACdE,MAAMF,YAAYE,IAAI,CAACH,GAAG,CAACI;oBAC7B;gBACF;YACA,KAAK;gBAAmB;oBACtB,OAAOH;gBACT;YACA;gBAAS;oBACP,OAAO;gBACT;QACF;IACF;AAEF,MAAMI,uBAAuB,CAACC;IAC5B,IAAIC,SAASR,OAAO,CAACS,MAAM,KAAK,GAAG;QACjC;IACF;IAEA,MAAMC,UAAUC,KAAKC,SAAS,CAAC;QAC7BC,OAAO;QACPb,SAASD,iBAAiBS,SAASR,OAAO;QAC1Cc,QAAQN,SAASM,MAAM;QACvB,mGAAmG;QACnGC,YAAYP,S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AAI4C,yBAAyB5C,OAAO;oBAClC;gBACF;gBACAgC,eAAeU,QAAQ1C;YACzB;IAEJ,EAAE,OAAM,CAAC;IACTI,SAASM,MAAM,GAAGA;IAClBhB,YAAY;AACd,EAAC","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..d0b0ded1a80c12d5e92865e82f486678182c0795
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js
@@ -0,0 +1,112 @@
+'use client';
+import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
+import { useState, createContext, useContext, use, useMemo, useCallback } from 'react';
+import { useLayoutEffect } from 'react';
+import { dispatcher } from 'next/dist/compiled/next-devtools';
+import { GlobalLayoutRouterContext } from '../../../shared/lib/app-router-context.shared-runtime';
+import { notFound } from '../../../client/components/not-found';
+export const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE = 'NEXT_DEVTOOLS_SIMULATED_ERROR';
+function SegmentTrieNode({ type, pagePath }) {
+ const { boundaryType, setBoundaryType } = useSegmentState();
+ const nodeState = useMemo(()=>{
+ return {
+ type,
+ pagePath,
+ boundaryType,
+ setBoundaryType
+ };
+ }, [
+ type,
+ pagePath,
+ boundaryType,
+ setBoundaryType
+ ]);
+ // Use `useLayoutEffect` to ensure the state is updated during suspense.
+ // `useEffect` won't work as the state is preserved during suspense.
+ useLayoutEffect(()=>{
+ dispatcher.segmentExplorerNodeAdd(nodeState);
+ return ()=>{
+ dispatcher.segmentExplorerNodeRemove(nodeState);
+ };
+ }, [
+ nodeState
+ ]);
+ return null;
+}
+function NotFoundSegmentNode() {
+ notFound();
+}
+function ErrorSegmentNode() {
+ throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE);
+}
+const forever = new Promise(()=>{});
+function LoadingSegmentNode() {
+ use(forever);
+ return null;
+}
+export function SegmentViewStateNode({ page }) {
+ const { tree } = useContext(GlobalLayoutRouterContext);
+ useLayoutEffect(()=>{
+ dispatcher.segmentExplorerUpdateRouteState(page, tree);
+ return ()=>{
+ dispatcher.segmentExplorerUpdateRouteState('', null);
+ };
+ }, [
+ page,
+ tree
+ ]);
+ return null;
+}
+export function SegmentBoundaryTriggerNode() {
+ const { boundaryType } = useSegmentState();
+ let segmentNode = null;
+ if (boundaryType === 'loading') {
+ segmentNode = /*#__PURE__*/ _jsx(LoadingSegmentNode, {});
+ } else if (boundaryType === 'not-found') {
+ segmentNode = /*#__PURE__*/ _jsx(NotFoundSegmentNode, {});
+ } else if (boundaryType === 'error') {
+ segmentNode = /*#__PURE__*/ _jsx(ErrorSegmentNode, {});
+ }
+ return segmentNode;
+}
+export function SegmentViewNode({ type, pagePath, children }) {
+ const segmentNode = /*#__PURE__*/ _jsx(SegmentTrieNode, {
+ type: type,
+ pagePath: pagePath
+ }, type);
+ return /*#__PURE__*/ _jsxs(_Fragment, {
+ children: [
+ segmentNode,
+ children
+ ]
+ });
+}
+const SegmentStateContext = /*#__PURE__*/ createContext({
+ boundaryType: null,
+ setBoundaryType: ()=>{}
+});
+export function SegmentStateProvider({ children }) {
+ const [boundaryType, setBoundaryType] = useState(null);
+ const [errorBoundaryKey, setErrorBoundaryKey] = useState(0);
+ const reloadBoundary = useCallback(()=>setErrorBoundaryKey((prev)=>prev + 1), []);
+ const setBoundaryTypeAndReload = useCallback((type)=>{
+ if (type === null) {
+ reloadBoundary();
+ }
+ setBoundaryType(type);
+ }, [
+ reloadBoundary
+ ]);
+ return /*#__PURE__*/ _jsx(SegmentStateContext.Provider, {
+ value: {
+ boundaryType,
+ setBoundaryType: setBoundaryTypeAndReload
+ },
+ children: children
+ }, errorBoundaryKey);
+}
+export function useSegmentState() {
+ return useContext(SegmentStateContext);
+}
+
+//# sourceMappingURL=segment-explorer-node.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..73096335c862021b2c8db87f9e944ffb51c82cd2
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/userspace/app/segment-explorer-node.tsx"],"sourcesContent":["'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n useState,\n createContext,\n useContext,\n use,\n useMemo,\n useCallback,\n} from 'react'\nimport { useLayoutEffect } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { GlobalLayoutRouterContext } from '../../../shared/lib/app-router-context.shared-runtime'\nimport { notFound } from '../../../client/components/not-found'\n\nexport type SegmentBoundaryType =\n | 'not-found'\n | 'error'\n | 'loading'\n | 'global-error'\n\nexport const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE =\n 'NEXT_DEVTOOLS_SIMULATED_ERROR'\n\nexport type SegmentNodeState = {\n type: string\n pagePath: string\n boundaryType: string | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}\n\nfunction SegmentTrieNode({\n type,\n pagePath,\n}: {\n type: string\n pagePath: string\n}): React.ReactNode {\n const { boundaryType, setBoundaryType } = useSegmentState()\n const nodeState: SegmentNodeState = useMemo(() => {\n return {\n type,\n pagePath,\n boundaryType,\n setBoundaryType,\n }\n }, [type, pagePath, boundaryType, setBoundaryType])\n\n // Use `useLayoutEffect` to ensure the state is updated during suspense.\n // `useEffect` won't work as the state is preserved during suspense.\n useLayoutEffect(() => {\n dispatcher.segmentExplorerNodeAdd(nodeState)\n return () => {\n dispatcher.segmentExplorerNodeRemove(nodeState)\n }\n }, [nodeState])\n\n return null\n}\n\nfunction NotFoundSegmentNode(): React.ReactNode {\n notFound()\n}\n\nfunction ErrorSegmentNode(): React.ReactNode {\n throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE)\n}\n\nconst forever = new Promise(() => {})\nfunction LoadingSegmentNode(): React.ReactNode {\n use(forever)\n return null\n}\n\nexport function SegmentViewStateNode({ page }: { page: string }) {\n const { tree } = useContext(GlobalLayoutRouterContext)\n useLayoutEffect(() => {\n dispatcher.segmentExplorerUpdateRouteState(page, tree)\n return () => {\n dispatcher.segmentExplorerUpdateRouteState('', null)\n }\n }, [page, tree])\n return null\n}\n\nexport function SegmentBoundaryTriggerNode() {\n const { boundaryType } = useSegmentState()\n let segmentNode: React.ReactNode = null\n if (boundaryType === 'loading') {\n segmentNode = \n } else if (boundaryType === 'not-found') {\n segmentNode = \n } else if (boundaryType === 'error') {\n segmentNode = \n }\n return segmentNode\n}\n\nexport function SegmentViewNode({\n type,\n pagePath,\n children,\n}: {\n type: string\n pagePath: string\n children?: ReactNode\n}): React.ReactNode {\n const segmentNode = (\n \n )\n\n return (\n <>\n {segmentNode}\n {children}\n >\n )\n}\n\nconst SegmentStateContext = createContext<{\n boundaryType: SegmentBoundaryType | null\n setBoundaryType: (type: SegmentBoundaryType | null) => void\n}>({\n boundaryType: null,\n setBoundaryType: () => {},\n})\n\nexport function SegmentStateProvider({ children }: { children: ReactNode }) {\n const [boundaryType, setBoundaryType] = useState(\n null\n )\n\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0)\n const reloadBoundary = useCallback(\n () => setErrorBoundaryKey((prev) => prev + 1),\n []\n )\n\n const setBoundaryTypeAndReload = useCallback(\n (type: SegmentBoundaryType | null) => {\n if (type === null) {\n reloadBoundary()\n }\n setBoundaryType(type)\n },\n [reloadBoundary]\n )\n\n return (\n \n {children}\n \n )\n}\n\nexport function useSegmentState() {\n return useContext(SegmentStateContext)\n}\n"],"names":["useState","createContext","useContext","use","useMemo","useCallback","useLayoutEffect","dispatcher","GlobalLayoutRouterContext","notFound","SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE","SegmentTrieNode","type","pagePath","boundaryType","setBoundaryType","useSegmentState","nodeState","segmentExplorerNodeAdd","segmentExplorerNodeRemove","NotFoundSegmentNode","ErrorSegmentNode","Error","forever","Promise","LoadingSegmentNode","SegmentViewStateNode","page","tree","segmentExplorerUpdateRouteState","SegmentBoundaryTriggerNode","segmentNode","SegmentViewNode","children","SegmentStateContext","SegmentStateProvider","errorBoundaryKey","setErrorBoundaryKey","reloadBoundary","prev","setBoundaryTypeAndReload","Provider","value"],"mappings":"AAAA;;AAGA,SACEA,QAAQ,EACRC,aAAa,EACbC,UAAU,EACVC,GAAG,EACHC,OAAO,EACPC,WAAW,QACN,QAAO;AACd,SAASC,eAAe,QAAQ,QAAO;AACvC,SAASC,UAAU,QAAQ,mCAAkC;AAC7D,SAASC,yBAAyB,QAAQ,wDAAuD;AACjG,SAASC,QAAQ,QAAQ,uCAAsC;AAQ/D,OAAO,MAAMC,2CACX,gCAA+B;AASjC,SAASC,gBAAgB,EACvBC,IAAI,EACJC,QAAQ,EAIT;IACC,MAAM,EAAEC,YAAY,EAAEC,eAAe,EAAE,GAAGC;IAC1C,MAAMC,YAA8Bb,QAAQ;QAC1C,OAAO;YACLQ;YACAC;YACAC;YACAC;QACF;IACF,GAAG;QAACH;QAAMC;QAAUC;QAAcC;KAAgB;IAElD,wEAAwE;IACxE,oEAAoE;IACpET,gBAAgB;QACdC,WAAWW,sBAAsB,CAACD;QAClC,OAAO;YACLV,WAAWY,yBAAyB,CAACF;QACvC;IACF,GAAG;QAACA;KAAU;IAEd,OAAO;AACT;AAEA,SAASG;IACPX;AACF;AAEA,SAASY;IACP,MAAM,IAAIC,MAAMZ;AAClB;AAEA,MAAMa,UAAU,IAAIC,QAAQ,KAAO;AACnC,SAASC;IACPtB,IAAIoB;IACJ,OAAO;AACT;AAEA,OAAO,SAASG,qBAAqB,EAAEC,IAAI,EAAoB;IAC7D,MAAM,EAAEC,IAAI,EAAE,GAAG1B,WAAWM;IAC5BF,gBAAgB;QACdC,WAAWsB,+BAA+B,CAACF,MAAMC;QACjD,OAAO;YACLrB,WAAWsB,+BAA+B,CAAC,IAAI;QACjD;IACF,GAAG;QAACF;QAAMC;KAAK;IACf,OAAO;AACT;AAEA,OAAO,SAASE;IACd,MAAM,EAAEhB,YAAY,EAAE,GAAGE;IACzB,IAAIe,cAA+B;IACnC,IAAIjB,iBAAiB,WAAW;QAC9BiB,4BAAc,KAACN;IACjB,OAAO,IAAIX,iBAAiB,aAAa;QACvCiB,4BAAc,KAACX;IACjB,OAAO,IAAIN,iBAAiB,SAAS;QACnCiB,4BAAc,KAACV;IACjB;IACA,OAAOU;AACT;AAEA,OAAO,SAASC,gBAAgB,EAC9BpB,IAAI,EACJC,QAAQ,EACRoB,QAAQ,EAKT;IACC,MAAMF,4BACJ,KAACpB;QAA2BC,MAAMA;QAAMC,UAAUA;OAA5BD;IAGxB,qBACE;;YACGmB;YACAE;;;AAGP;AAEA,MAAMC,oCAAsBjC,cAGzB;IACDa,cAAc;IACdC,iBAAiB,KAAO;AAC1B;AAEA,OAAO,SAASoB,qBAAqB,EAAEF,QAAQ,EAA2B;IACxE,MAAM,CAACnB,cAAcC,gBAAgB,GAAGf,SACtC;IAGF,MAAM,CAACoC,kBAAkBC,oBAAoB,GAAGrC,SAAS;IACzD,MAAMsC,iBAAiBjC,YACrB,IAAMgC,oBAAoB,CAACE,OAASA,OAAO,IAC3C,EAAE;IAGJ,MAAMC,2BAA2BnC,YAC/B,CAACO;QACC,IAAIA,SAAS,MAAM;YACjB0B;QACF;QACAvB,gBAAgBH;IAClB,GACA;QAAC0B;KAAe;IAGlB,qBACE,KAACJ,oBAAoBO,QAAQ;QAE3BC,OAAO;YACL5B;YACAC,iBAAiByB;QACnB;kBAECP;OANIG;AASX;AAEA,OAAO,SAASpB;IACd,OAAOd,WAAWgC;AACpB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/terminal-logging-config.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/terminal-logging-config.js
new file mode 100644
index 0000000000000000000000000000000000000000..9aa056f3231a04fa379ee6ae32865d5b953539de
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/terminal-logging-config.js
@@ -0,0 +1,13 @@
+export function getTerminalLoggingConfig() {
+ try {
+ return JSON.parse(process.env.__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL || 'false');
+ } catch {
+ return false;
+ }
+}
+export function getIsTerminalLoggingEnabled() {
+ const config = getTerminalLoggingConfig();
+ return Boolean(config);
+}
+
+//# sourceMappingURL=terminal-logging-config.js.map
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/terminal-logging-config.js.map b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/terminal-logging-config.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..12d0aa7a6b2bc16d2126e69cdc1c7c66858749f6
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/app/terminal-logging-config.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../../../../../src/next-devtools/userspace/app/terminal-logging-config.ts"],"sourcesContent":["export function getTerminalLoggingConfig():\n | false\n | boolean\n | {\n depthLimit?: number\n edgeLimit?: number\n showSourceLocation?: boolean\n } {\n try {\n return JSON.parse(\n process.env.__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL || 'false'\n )\n } catch {\n return false\n }\n}\n\nexport function getIsTerminalLoggingEnabled(): boolean {\n const config = getTerminalLoggingConfig()\n return Boolean(config)\n}\n"],"names":["getTerminalLoggingConfig","JSON","parse","process","env","__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL","getIsTerminalLoggingEnabled","config","Boolean"],"mappings":"AAAA,OAAO,SAASA;IAQd,IAAI;QACF,OAAOC,KAAKC,KAAK,CACfC,QAAQC,GAAG,CAACC,qCAAqC,IAAI;IAEzD,EAAE,OAAM;QACN,OAAO;IACT;AACF;AAEA,OAAO,SAASC;IACd,MAAMC,SAASP;IACf,OAAOQ,QAAQD;AACjB","ignoreList":[0]}
\ No newline at end of file
diff --git a/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/pages/hydration-error-state.js b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/pages/hydration-error-state.js
new file mode 100644
index 0000000000000000000000000000000000000000..05efd83c1994b5c50cf8a43005201e8a8afb3565
--- /dev/null
+++ b/e-commerce/node_modules/next/dist/esm/next-devtools/userspace/pages/hydration-error-state.js
@@ -0,0 +1,131 @@
+import { getHydrationWarningType, isHydrationError as isReact18HydrationError, isHydrationWarning as isReact18HydrationWarning } from '../../shared/react-18-hydration-error';
+import { isHydrationError as isReact19HydrationError, isErrorMessageWithComponentStackDiff as isReact19HydrationWarning } from '../../shared/react-19-hydration-error';
+// We only need this for React 18 or hydration console errors in React 19.
+// Once we surface console.error in the dev overlay in pages router, we should only
+// use this for React 18.
+let hydrationErrorState = {};
+const squashedHydrationErrorDetails = new WeakMap();
+export function getSquashedHydrationErrorDetails(error) {
+ return squashedHydrationErrorDetails.has(error) ? squashedHydrationErrorDetails.get(error) : null;
+}
+export function attachHydrationErrorState(error) {
+ if (!isReact18HydrationError(error) && !isReact19HydrationError(error)) {
+ return;
+ }
+ let parsedHydrationErrorState = {};
+ // If there's any extra information in the error message to display,
+ // append it to the error message details property
+ if (hydrationErrorState.warning) {
+ // The patched console.error found hydration errors logged by React
+ // Append the logged warning to the error message
+ parsedHydrationErrorState = {
+ // It contains the warning, component stack, server and client tag names
+ ...hydrationErrorState
+ };
+ // Consume the cached hydration diff.
+ // This is only required for now when we still squashed the hydration diff log into hydration error.
+ // Once the all error is logged to dev overlay in order, this will go away.
+ if (hydrationErrorState.reactOutputComponentDiff) {
+ parsedHydrationErrorState.reactOutputComponentDiff = hydrationErrorState.reactOutputComponentDiff;
+ }
+ squashedHydrationErrorDetails.set(error, parsedHydrationErrorState);
+ }
+}
+// TODO: Only handle React 18. Once we surface console.error in the dev overlay in pages router,
+// we can use the same behavior as App Router.
+export function storeHydrationErrorStateFromConsoleArgs(...args) {
+ let [message, firstContent, secondContent, ...rest] = args;
+ if (isReact18HydrationWarning(message)) {
+ // Some hydration warnings has 4 arguments, some has 3, fallback to the last argument
+ // when the 3rd argument is not the component stack but an empty string
+ // For some warnings, there's only 1 argument for template.
+ // The second argument is the diff or component stack.
+ if (args.length === 3) {
+ secondContent = '';
+ }
+ const warning = message.replace(/Warning: /, '').replace('%s', firstContent).replace('%s', secondContent)// remove the last %s from the message
+ .replace(/%s/g, '');
+ const lastArg = (rest[rest.length - 1] || '').trim();
+ hydrationErrorState.reactOutputComponentDiff = generateHydrationDiffReact18(message, firstContent, secondContent, lastArg);
+ hydrationErrorState.warning = warning;
+ } else if (isReact19HydrationWarning(message)) {
+ // Some hydration warnings has 4 arguments, some has 3, fallback to the last argument
+ // when the 3rd argument is not the component stack but an empty string
+ // For some warnings, there's only 1 argument for template.
+ // The second argument is the diff or component stack.
+ if (args.length === 3) {
+ secondContent = '';
+ }
+ const warning = message.replace('%s', firstContent).replace('%s', secondContent)// remove the last %s from the message
+ .replace(/%s/g, '');
+ const lastArg = (args[args.length - 1] || '').trim();
+ hydrationErrorState.reactOutputComponentDiff = lastArg;
+ hydrationErrorState.warning = warning;
+ }
+}
+/*
+ * Some hydration errors in React 18 does not have the diff in the error message.
+ * Instead it has the error stack trace which is component stack that we can leverage.
+ * Will parse the diff from the error stack trace
+ * e.g.
+ * Warning: Expected server HTML to contain a matching in